Created
March 26, 2014 15:39
-
-
Save thomaswelton/9786240 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//redirect for the website | |
$isFB = strripos($_SERVER['HTTP_USER_AGENT'], 'facebookexternalhit'); | |
if($isFB === false && is_null(JRequest::getVar('signed_request',NULL)) && is_null(JRequest::getVar('nr',NULL)) && is_null(JRequest::getVar('task',NULL)) && JRequest::getVar('view') != 'entrylist' ) { | |
//Facebook needs to see this page on our domain to get the og tags, but users should be redirected to the tab version | |
$redirectUrl = 'http://apps.facebook.com/'.$facebook->getAppId().'/?app_data='.json_encode($app_data); | |
$mainframe->redirect($redirectUrl); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment