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.
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.
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.
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.
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.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With