Unknown OAuthException from basic OpenGraph user API calls - facebook

Starting around Friday night, and continuing as of this morning, we have been seeing errors for simple open graph queries for valid users.
For example: https://graph.facebook.com/833150354
Returns:
{
"error": {
"type": "OAuthException",
"message": "An unknown error has occurred."
}
}
But, the user is valid:
http://www.facebook.com/profile.php?id=833150354
It looks like at least one other person has run into this: http://bugs.developers.facebook.net/show_bug.cgi?id=20490
Has anyone else seen this behavior and, if so, found a work around? Thanks!

Experienced the same error with 2 of our app's users today. Their OG representation throws the error, but their regular FB profile works fine. Sounds like an OpenGraph bug, not sure of any possible workaround :\

Sometime between 7:50 and 8:50 PM EST on 9/13, this problem went away for us. All the other cases I've seen shared also appear to work now.
Love that Facebook never acknowledged the issue in any way I could find even though it was broken for 5 days.

I get the "unknown error" all the time, when I query the graph using the application's token. When I have the current user's token, that works. But the application token fails.
(The app's token worked before the oauth upgrade, BTW.)

Related

Facebook Test User error

I use facebook login in my app and have tests for it. I use the /{app-id}/accounts/test-users endpoint to create users for my tests but the endpoint fails with the very generic
{
"error": {
"message": "An unknown error has occurred.",
"type": "OAuthException",
"code": 1
}
}
(which says the API is possibly down). I tried this with 3 different appids/secrets, both with using app_id|app_secret as the token and with a token from the get token endpoint. I also tested this on the Graph Api Explorer and it's giving me the same error. It was working fine but then it suddenly stopped.
What I want to know is 1. is it down? and 2. if not, what did i do wrong or what changed since yesterday?
+1 this also started to me yesterday mid-morning, with code and an FB app which had been working previously and was unchanged.
When I look at https://developers.facebook.com/apps/FB_APP_ID/roles/test-users/, I can see the new users.
So the call is "working" in that new users are being created, but it is broken in that we get a 500 and we don't get an access_token.
I don't have an answer yet.
I ran into a similar problem last week. After long hours of debugging I found out that I would get this same error every time I tried to create multiple test users with the same name simultaneously (i.e. when running tests in multiple threads).
So instead of setting custom a user name I don't even use the name field and I just let Facebook generate one. This way everything works fine. Seriously. I love Facebook API so much. :)
Hope this helps someone.

I can't use "friends locations" with the Graph api explorer anymore

as the title says, I can no longer use friends locations with the graph api explorer any more(in https://developers.facebook.com). Even if I click all access token checkboxes,(trying to get me/friends?fields=locations.fields(place)) I still get error(
{
"error": "Request failed"
}). But me/locations?fields=place works, so it must be someting with "friends" that makes it to crash.
I was able use it 2 weeks ago, and I have not done any changes, it just suddenly stoped working. if I login with my test Account I can get all the parameters I request, but not on my primary account. Is there any one that has any idea what the problem can be? or why it occurred? I have done everything that I can think of, from using diffrent web browers, deleting all history, use diffrent computer. I have compared the settings for both my test account and my main account, both have the same settings.
I am sincerely sorry if i have misspelled anything.
It happens for me as well for any of the locations methods, but the location method with out the s works. I don't know if that data is usable for you.
me/friends?fields=location,hometown
I have figured out the reason to this problem. I has to do with requests from facebook's api, if i lower the Limit per request it works. Then to save the information I use offset.

Facebook Page feed not accessible via JS SDK nor Graph API

I'm recently experiencing troubles with a company page at Facebook. I used to access the https://graph.facebook.com/[page alias]/feed url (providing an access token of course). It has been working for months now and it suddenly stopped.
The JSON I get is the following:
{
message: "An unexpected error has occurred. Please retry your request later.",
type: "OAuthException",
code: 2
}
It stopped working the day/night after the page posted a status containing a link (in terms of Facebook graph), and also it contained 3 bit.ly links. I have the assumption that the (whole!) feed got blocked because of this, as this could be considered spamming ... It's a serious website, though!
Any tips on this? I found this on the internet: http://support.conversocial.com/entries/23482331-Known-issue-Facebook-Shortened-URLs-such-as-bit-ly
My advice would be to remove the post containing those links and - hope - that it gets "enabled" at some time - but it would be disappointing if not, of course :)

Facebook App - {"error":{"message":"(#1) An error occured while creating the share","type":"OAuthException","code":1}}

When my app tries to post on "friends wall" sometimes i receive this error:
{"error":
{"message":"(#1) An error occured while creating the share",
"type":"OAuthException",
"code":1}
}
I'm sure to have (and to use) long access_token and publish_stream permission, in fact sometimes it works and sometimes not.
Do you have any idea about the cause of the problem?
The ability to post on a friend's wall has been deprecated and will be removed in 90 days (for the reasons described in this blog post: https://developers.facebook.com/blog/post/2012/10/10/growing-quality-apps-with-open-graph/
Whilst that doesn't directly answer your question, it does make it moot and you should take an alternative approach (also described in the post)

Why does Facebook batch API request sometime return nulls?

I use Facebook's batch request quite a bit in my app. For the most part, it works really well, but one thing that confuses me is why does their API sometimes return nulls? If I get this "nulls" response, I can just try again moments later and it will work.
Here's an example:
URL:
https://graph.facebook.com/?access_token={access_token}
Request Body (prior to encoding):
batch=[{"method":"GET","relative_url":"{page_id}?return_ssl_resources=1"},{"method":"GET","relative_url":"{page_id}?return_ssl_resources=1"},{"method":"GET","relative_url":"{page_id}?return_ssl_resources=1"},{"method":"GET","relative_url":"{page_id}?return_ssl_resources=1"}]
Here's what Facebook sometimes returns:
[null,null,null,null]
If I make the same request a second later, I get the proper response:
[{"code":200,"headers":[...headers here...],"body":{...body here...},{"code":200,"headers":[...headers here...],"body":{...body here...},{"code":200,"headers":[...headers here...],"body":{},{"code":200,"headers":[...headers here...],"body":{...body here...}}]
The behavior is not always consistent. Most of the time I can try again and get a proper response. Occasionally I need to try 2 to 3 times. This problem happens dozens of times a day and it's been going on as long as I can remember. I checked my App diagnostics on Facebook and my App doesn't have any restrictions, there's no API throttling, and Facebook doesn't even list these under their "API Errors" report. Any idea why this happens?
It seems that this problem has corrected itself. I haven't seen this error show up for a few days now.
Bug report here:
http://developers.facebook.com/bugs/295201867209494?browse=search_4f42b29071ebc7f92807017