开发者

Facebook: app access token is not recognized

I did quite a bit of homework before posting here but still could not find a solution for the following problem.

PROBLEM: when trying to access my facebook app's insights or subscriptions,开发者_如何学Python it returns

{
   "error": {
      "message": "An access token is required to request this resource.",
      "type": "OAuthException"
   }
}

I do everything according to the official documentation:

  1. get app access_token by calling this api. It does return a token. https:// graph.facebook.com/oauth/access_token?client_id=APP_ID&client_secret=APP_SECRET&grant_type=client_credentials

  2. get insights/subscriptions by calling: https:// graph.facebook.com/APP_ID/subscriptions?access_token=TOKEN_FROM_STEP_1

but the last call returns the error message above.

Any ideas why?


After many trials and errors I found the solution.

Change facebook app type to 'Web' instead of 'Native'

Apparently facebook doesn't return subscriptions/insights for native apps

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜