Fix the bug in the setExtendedAccessToken()
method within the base_facebook.php
library.
Find this code at the bottom of that method:
$this->destroySession();
$this->setPersistentData(
'access_token', $response_params['access_token']
);
Add this line immediately following:
$this->accessToken = $response_params['access_token'];
Without that line, the access token is only stored in persistent data. I think you tried to get it out of Session[...]
, but it must still not be the correct token.
I had this exact same problem, where I couldn't get the extended token no matter what I did. I added the above line, and then re-entered the app through the apps.facebook.com
so it would generate a signed request. Each of my test users properly picked this up and stored a token in session with an expiration date 60 days out.