Reputation: 625
I have a strange issue, that appears since yesterday (07/20/2015). My script worked perfectly since August 2014, so nearly a year, but now it rejects working. If I post a picture or a text to Facebook, I get this server error message:
PHP Fatal error: Uncaught GraphMethodException: Invalid appsecret_proof provided in the API argument\n thrown in .../base_facebook.php on line 1329
This is a line in the function throwAPIException in the Facebook PHP SDK (v.3.2.3). I know, it has something to do with with the option Require App Secret (in Facebook Devs -> Apps -> Settings -> Advanced). This option is deactivated for a year, so maybe I have to add something new to my script?
In this stackoverflow-post I found a hint to add this line while calling:
FacebookSession::enableAppSecretProof(false);
...but this is related to the newer SDK v.4, not to v.3. In my script, I call the SDK v.3 with:
$facebook = new Facebook(array( 'appId' => $App_ID, 'secret' => $App_Secret, 'cookie' => true ));
$facebook->setAccessToken($Access_Token);
Is there a way to add enableAppSecretProof anywhere there? Thanks for helping me! :-)
Upvotes: 1
Views: 1398
Reputation: 625
Solution: in line 918 of the base_facebook.php you have to comment these three lines
# if (isset($params['access_token']) && !isset($params['appsecret_proof'])) {
# $params['appsecret_proof'] = $this->getAppSecretProof($params['access_token']);
# }
That's it.
Upvotes: 1