BerkErarslan
BerkErarslan

Reputation: 69

Facebook-php-sdk "Session has expired at unix time" with offline_access

I want to make wall post to people's friends ( offline ) I took permissions for wall post and offline access. But most of the users have error when I try to offline wall post

"Fatal error: Uncaught OAuthException: Error validating access token: Session has expired at unix time 1332190800. The current unix time is 1339803350. thrown in /home/......"

I think access token with offline access never expired ?

If it is expired, How can I take the new access token without touch the people ( offline )

I used this code

$post =  array(
        'access_token' => "ACCESSTOKEN",
        'message' => test",
        'link'          =>  'http://apps.facebook.com/xx',
        'description'   =>  'test'
         );


            $result = $facebook->api("/FRIENDS_ID/feed/",'post', $post);

Upvotes: 0

Views: 1644

Answers (1)

cpilko
cpilko

Reputation: 11852

The Facebook offline_access permission was deprecated last month. This feature is scheduled to be removed on July 5.

The new workflow requires you to get a long-term access token, which must be renewed every 60 days. There is more information about this here: https://developers.facebook.com/blog/post/2011/05/13/how-to--handle-expired-access-tokens/

Upvotes: 1

Related Questions