Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot access application using the specified access_token

I am using Facebook long time tokens(2 months), but FB starts to be nondeterminic and gives me sometimes this return

{
   "error": {
      "message": "Cannot access application using the specified access_token",
      "type": "OAuthException",
      "code": 1
   }
}

I am using PHP SDK.

I am using this link to get 2 months token https://graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRETgrant_type=fb_exchange_token&fb_exchange_token=SHORT_TIME_TOKEN

Any ideas?

like image 677
lota Avatar asked Aug 22 '12 19:08

lota


1 Answers

I was experiencing this issue, and got some support direct from FB staff. The most likely cause of this error is "demographic checks" for the user.

Our app had an age-gate as it was alcohol related. Certain users' profiles did not contain enough information for FB to ensure they were above the drinking age for their location, so the session creation failed. Why this only happened on this call and not on earlier ones, I don't know.

Does your app have an age-gate, or anything similar?

like image 159
Adam C Avatar answered Sep 22 '22 07:09

Adam C