Issue
I am trying to use facebook v4 sdk for login. When I call the function it generates following error
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /Facebook/FacebookSession.php on line 93
I checked the file and found this is the function that throws error
public function getSessionInfo($appId = null, $appSecret = null)
{
$targetAppId = static::_getTargetAppId($appId);
$targetAppSecret = static::_getTargetAppSecret($appSecret);
return (new FacebookRequest(
static::newAppSession($targetAppId, $targetAppSecret),
'GET',
'/debug_token',
array(
'input_token' => $this->getToken(),
)
))->execute()->getGraphObject(GraphSessionInfo::className());
}
But I am not able to understand what is wrong in this .
Can any one help me out please Thanks in advance
Solution
You are most likely not using PHP 5.4+. The PHP SDK 4.x requires a PHP Version greater than or equal to 5.4 - many providers did not upgrade yet, unfortunately. You need to ask your provider if he is willing to upgrade, or use the older PHP SDK 3.x (not recommended).
Answered By - andyrandy
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.