Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Facebook Graph API giving an unknown OAuthException

When I send a request to https://graph.facebook.com/me/home?access_token=(access code goes here) Facebook gives me this error message:

{
   "error": {
      "type": "OAuthException",
      "message": "An unknown error has occurred."
   }
}

Every other API call works. If anybody knows anything about this issue, please help me.

like image 900
user434565 Avatar asked Jun 07 '11 17:06

user434565


People also ask

What does OAuthException mean on Facebook?

OAuthException: If you receive an OAuthException error, it means that Edgar doesn't have the correct permissions to access your Facebook accounts right now. The password may have been changed on Facebook or Facebook may have reset your security session.

What data can I get from Facebook Graph API?

The Facebook Graph API is all about getting data into and out of Facebook. With this API, you can query data and create powerful dashboards to understand your content and audience better. For example, you can extract information from your own Page that shows who wrote each post and how many people liked it.

Is Facebook Graph API deprecated?

Graph API Version Deprecations: November 2, 2021: Graph API v4. 0 will be deprecated and removed from the platform. February 3, 2022: Graph API v5. 0 will be deprecated and removed from the platform.

Is Facebook Graph API RESTful?

The Legacy REST API is in the process of being deprecated, while the Graph API is the most current, so if you're unsure of which one to use, your best bet is to go with that one. As you suggested, the Graph API, just like the Legacy REST API, is in fact a RESTful API.


1 Answers

Facebook does not have very good error messages...

Apparantly, "An unknown error has occurred" means that I did not have valid permissions to access the user's news feed.

You have to include "read_stream" in your scope, or else facebook will reject your request with an ambiguous error message.

I <3 you facebook API

like image 171
user434565 Avatar answered Oct 25 '22 00:10

user434565