like photo from graph api explorer - facebook-graph-api

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...

Related

How do we can get story insights of Instagram with graph api?

I want to get Instagram stories insights which published in the last 24 hours. I currently only access to story basic details alike, story image, owner id, etc with this api:
https://graph.facebook.com/story_id/?fields=id,media_type,media_url,owner,timestamp,caption&access_token={access_token}
Actually i want to get all details which is that: exits,impressions,reach,replies,taps_forward,taps_back
but when I try this with this api:
https://graph.facebook.com/story_id/insights?metric=exits,impressions,reach,replies,taps_forward,taps_back&access_token={access_token}
it show me that error. always.
{
"error": {
"message": "(#10) Not enough viewers for the media to show insights",
"type": "OAuthException",
"code": 10,
"fbtrace_id": "AvZdhqaXB1_Dij7B1DD-pSR"
}
}
even that on reference of graph api they tell us do same like :
Reference: https://developers.facebook.com/docs/instagram-api/reference/media/insights#create
I dont know how to fill butt it shows me error always
https://i.stack.imgur.com/55rBy.png
You need to set up a webhook for it:
https://developers.facebook.com/docs/instagram-api/guides/webhooks/
https://developers.facebook.com/docs/graph-api/webhooks/getting-started
Your webhook URL will get the insights of a story (or media object, to be specific) right when it disappears, with a POST request from Instagram.
Careful though, you cannot access the story details anymore if you get the webhook, so you have to get the stories when they exist (for example, with a cron job that runs at least every 23h to get all stories) and add the insights data later by matching the media id.

Facebook Ads Attribution Data - Error #100

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

Like Facebook post of user, Who is not in my friend list or you can say liking a public post

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?

Accessing users friends work history using GRAPH API 2.3

How can I get the users friends work history? Currently I tried this in the Graph api explorer:
GET /me/taggable_friends?fields=id,name,work&acess_token...
and the query returns the friends, but don't show any job.
The response returns me somethin like this:
"data": [
{
"id": "<some-long-string>",
"name": "<name>"
},
I tried to do this:
GET /<the-some-long-string>...
And the response says me that the user id is incorrect. Googling I didn't found anything :'(
Thank you!!!
From Facebook Developers:
"message": "(#10) To use taggable_friends on behalf of people who are
not admins, developers and testers of your app, your use of this
endpoint must be reviewed and approved by Facebook. To submit this
feature for review please read our documentation on reviewable
features: https://developers.facebook.com/docs/apps/review"

Posting an image to a reply using Graph API

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