开发者

How to handle OAuthAccessTokenException in facebook api searches

开发者 https://www.devze.com 2023-01-10 10:46 出处:网络
I\'m using Facebook API for searching. For example if I want to search for \'Conti\' i get thsi 开发者_StackOverflowurl: https://graph.facebook.com/search?q=%22Conti%22&type=post

I'm using Facebook API for searching. For example if I want to search for 'Conti' i get thsi 开发者_StackOverflowurl: https://graph.facebook.com/search?q=%22Conti%22&type=post

In this particular case, and others, instead of getting the list of results, I get this error:

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

why is this? should i get a token in order to the get the results?

UPDATE

Do I need to register an app?


You need to get the access token first, have a look at this tutorial:

  • Facebook Graph API — getting access tokens
0

精彩评论

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