Weird Facebook API – Facebook PHP-SDK behavior. CSRF state token does not match one provided

by Nishant Arora on 14/10/2012







Pin It

I checked again and again with Devs facing a similar issue with Facebook API. The PHP-SDK logs an error on every run that says

The weird thing is, the intended application seems to work fine (It’s a batch posting script and as soon as I reset the batch, it generates this error.)

So I tracked down to base_facebook.php in the PHP-SDK provided here. and changed this code (in here):

to this one (just to track errors in the error log):

On running the app again, I get the updated error to:

now, $this->state() is NULL, I did not expect this to be the least of the errors in facebook sdk. I’m sure my app only generates one login url request, that too only if the user has no session with my app.

Help will be appreciated. Read the SO question here

PS: you can workaround this problem by commenting out:

Incoming search terms:

csrf state token does not match one provided | csrf state token does not match one provided facebook | /me/videos facebook api php | token no one provided facebook | how to clear the state token after facebook login | hack facebook csrf | facebook php sdk get album cover image | facebook fetch all albums plus cover photo image links php sdk | facebook csrf token | facebook csrf state token does not match one provided | facebook csrf state token | facebook api php sdk post /me/video watch | Faccebook easy hack 8y username free | csrf state token does not match one provided in error log | wordpress csrf state token does not match |
  • Dimitris Kanellopoulos

    Any luck on this?


Some Other Random Posts:


No related content found.

; Click Here To Buy Me A Drink!