New Facebook PHP SDK not working - Joomla! Forum - community, help and support
hi i've been trying implement facebook code in joomla component, works fine outside joomla enviroment, add in component function, returns empty user causing infinite loop, apache error "csrf state token not match 1 provided". not using htaccess .. causing in joomla 2.5, solution?.
code: select all
$facebook = new facebook(array(
"appid" => '123455678',
"secret" => 'werewdfsdfewrdsvcxfg',
));
$fbuser = $facebook->getuser();
if ($fbuser) {
try {
$user_profile = $facebook->api('/me');
$fb_uid = $facebook->getuser();
}
catch (facebookapiexception $e) {
$fbuser = null;
$app->enqueuemessage($e->getmessage(), 'error');
}
}
if (!$fbuser){
$loginurl = $facebook->getloginurl($params);
$app->redirect($loginurl);
}else{
print_r($user_profile);
}
nvm found workaround..
Comments
Post a Comment