2011-10-10

I'm using Facebook PHP SDK and trying to post image to the user's wall. However I get error below:

"Fatal error: Uncaught OAuthException: An active access token must be used to query information about the current user. thrown in C:\developing...\base_facebook.php on line 1033"

I understand that my access token is not valid, but I can't understand why. I have global facebook object and I'm using $facebook->api function in the subsite of my website (different url, where I have orginally asked access token). My question is that do I need new access tokens for my subsites? Basicly that would mean that I need new app key and secret code as well, because Facebook allows redirecting only for one page spesified in Developer Site.

Below is quite basic api call:

$upload_photo = $this->facebook->api('/me/photos?access_token='.
$this->facebook->getAccessToken(), 'post', $photo_details);

Show more