I'm trying to post an image from a URL to reply to a certain comment on Facebook. The Graph API documentation at https://developers.facebook.com/docs/graph-api/reference/object/comments/ mentions that you can publish an image from a URL using the 'attachment_url' field.
When I try that in Graph API explorer by posting attachment_url to {comment_id}/comments, I get the following error:
{
"error": {
"message": "An unexpected error has occurred. Please retry your request later.",
"type": "OAuthException",
"code": 2
}
}
If I try to post a message, it works perfectly, but attachment_url doesn't work, even though the documentation mentions it. Anybody has any idea what's going on here?
NOTE: I wanna first try to knock it off using the Graph API Explorer, then I would move to my desired language. As such, I don't have any code to paste here. Thanks
This was a bug in the API and about 2 weeks after my report, Facebook has finally resolved this. Here is the bug report:
https://developers.facebook.com/bugs/1487638524783972
Related
Pretty straightforward: I'm trying to get Facebook ads attribution data for my Android app using Open Graph API (so I can detect which users came from Facebook ads, which ad, etc). When I use the below url, I get the following error:
{ "error": {
"message": "(#100) Tried accessing nonexisting field (activities) on node type (Application)",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "H4b8LYlSGeN" } }
https://graph.facebook.com/{app_id}/activities?access_token={token}&event=MOBILE_APP_INSTALL&attribution={attribution_id}
I got the method via this page in their documentation, which does appear to indicate it works the way I expect.
Am I missing something here? Am I using a totally wrong method to get attribution data?
I was making a GET request rather than a POST because I'm a dumdum
I have two Facebook test users A and B. Both users are using my Facebook app. As app in development mode, I give all the permissions to app for both the users and created the access token for both the users.
Now I can get feed of both the users A and B. So I found a feed of user B used post id is 238863083139817. But when I tried to like the post of B from A using given bellow graph API.
POST/v2.6/1542696762701116_238863083139817/likes
I got the error message give bellow.
{
"error": {
"message": "(#100) Error finding the requested story",
"type": "OAuthException",
"code": 100,
"fbtrace_id": "DH4NvDpj3aN"
}
}
Here 1542696762701116 is my id.
Anybody know how can I like the post of user who is not in my friend list.
The same code will work if user A and B will be friends.
At first sight, it seems to be a problem with the permissions of the application. Maybe could you add some to check if the problem remains.
For instance, I saw that post:
"(#100) Error finding the requested story" encountered when POSTing like on a post
It talks about the permission: read_stream that can help to solve your problem.
Could you try and give your feedback?
I am trying to like a friends photo for some preliminary research on a website feature and I'm finding strangeness in the graph api explorer. I have the publish stream option checked. But when I set the dropdown to POST and set the URL to IMAGE_ID/likes, it reports:
{
"error": {
"message": "Trying Too Often: You are attempting this too often. Please try again later.",
"type": "OAuthException",
"code": 368
}
}
and then I am immediately logged out of facebook. Would a kind soul be willing to try to like a friend's photo through the Graph API explorer and see if it works?
Sure, pass the URL and I'll see what happens.
Tested it with a pic from a friend of mine, worked like charm...
I've a facebook application and a group for that application. Is it possible to make the application automatically post on the group. As far as posting is concern, its ok but how to give the application permission to post on the group?
I'm using facebook graph explorer to test this
https://graph.facebook.com/GROUP_ID/feed, method Post and adding a field 'link' with URL 'http://www.google.com' and selecting application as the application i want. I'm getting this error:
{
"error": {
"message": "An unexpected error has occurred. Please retry your request later.",
"type": "OAuthException",
"code": 2
}
}
The error doesn’t exactly say this, but I’d guess it’s thrown because your not sending a valid access token.
Get a user access token from one of the users that is allowed to post to that group’s wall.
The problem was a permission problem and the permission needed was user_groups,publish_stream
I am using graph API to get the feed post.
https://graph.facebook.com/128172073865656/feed?limit=200
but it is showing exception
{
"error": {
"type": "OAuthException",
"message": "An access token is required to request this resource."
}
}.
Could any one please help.
Quite simply, you need to obtain and supply an access token with your request.
In particular, the Graph API connections that you're trying to load have been changed recently, and now require an access_token, where they previously did not.
See the Facebook Developer Blog, posts on this:
https://developers.facebook.com/blog/post/509/ - Notification of change in requirements.
https://developers.facebook.com/blog/post/510/ - Confirmation that the changes are now live.