Error in facebook api using php SDK
I am using facebook PHP SDK to access the friend list
include_once("../fb-config.php");
include_once("../facebook.php");
try{
$facebook = new Facebook(array(
'appId' => 'FACEBOOK_APP_ID',
'secret' => 'FACEBOOK_SECRET',
'cookie' => true, // enable optional coo开发者_运维技巧kie support
));
$uid=$facebook->getUser();
$data = $facebook->api( array( 'method' => 'friends.getappusers') );
var_dump($data);
} catch (FacebookApiException $e) {
echo $e->__toString();
}
i get the following error
Exception: 104: Requires valid signature
Please help
Make sure your App ID and App Secret are correct and also your website URL matches the one which you inserted when you was creating application over facebook using Developer app.
精彩评论