Instagram stories graph api - facebook-graph-api

I making a GET request to https://graph.facebook.com/17841XXXXXXXXX/stories
I am getting the following error
"Unsupported get request. Object with ID 'xxxxxxx989027xxxx' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException"
Please help to sort this out and get the url of the IG stories

Related

Can't recover details from a Instagram Post recovered via Hashtag Search - error_subcode 33

I'm trying to retrieve updated info about some Instagram Posts, recovered via Hashtag Search.
When I request the data of any of them, e.g. https://graph.facebook.com/v11.0/{ig-media-id}, I receive an error:
{
"error": {
"message": "Unsupported get request. Object with ID 'xxxxxxxxxxxxxx' does not exist,
cannot be loaded due to missing permissions, or does not support this operation.
Please read the Graph API documentation at
https://developers.facebook.com/docs/graph-
api",
"type": "GraphMethodException",
"code": 100,
"error_subcode": 33,
"fbtrace_id": "xxxxxxxxxxxxx"
}
}
I know that there are some restrictions for posts recovered via hashtag search, as privacy of the post owner. But the Id that is returned with each of the posts seems "fake", or have a completely different role in this case.
If I try to recover the posts of my Business Account, I can use the Ids associated with the medias returned normally in the request above, and the details are returned.
So my questions are: what is the Id in a Instagram Media returned from Graph API' Instagram Hashtag search, if not the Media Id itself? And how can I get recent versions of the post with this Id? I need it to update the media_url property, when it expires.
Thanks in advance!
Having the same issue. I think it is because you basically can not get information about posts found using hashtag search. They are anonymized.

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

Facebook Graph API can't get shared post content but the original

I'm trying to get the content of the a facebook post using facebook graph API v2.9. I get error in the case of my friend shares a video from another page.
https://graph.facebook.com/v2.9/743711040_10155091021136041?fields=source,created_time&access_token=[user_access_token]
Where the '743711040_10155091021136041' is [userid_postid] and the user access token has the the following permissions:
"public_profile", "user_friends", "user_posts", "email"
The response I get is:
error: {
message: "Unsupported get request. Object with ID '743711040_10155091021136041' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
type: "GraphMethodException",
code: 100,
fbtrace_id: "BF9o+18whmD"
}
But when I try with the original page post that my friend has shared:
https://graph.facebook.com/v2.9/960234257424791_1318359071612306?fields=source,created_time&access_token=[user_access_token]
Where the '960234257424791_1318359071612306' is [pageid_postid] I get a success response:
source: "https://video.xx.fbcdn.net/v/t42.1790-2/18524911_304316830006313_7455758837228765184_n.mp4?efg=eyJybHIiOjMzMSwicmxhIjo2NTgsInZlbmNvZGVfdGFnIjoic3ZlX3NkIn0%3D&_nc_pt=1&rl=331&vabr=184&oh=3b3077d9a1e2b645f1531d6562ee4da8&oe=5942A4AF",
created_time: "2017-05-15T11:24:41+0000",
id: "960234257424791_1318359071612306"
Please tell me if I'm missing something? Need another permission? Or what could be the problem?
Update
If it is really impossible to get post details of a friend that hasn't authorize my app, then can I at least get the original post_id of the page post that my friend has shared? This will be very helpful.

Graph API not responding

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.