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
Related
I need to have the ability to ban users in page via API. I use next request:
POST
/page_id/blocked
data: user=user_id
It was working earlier. But now is not working. Currently I get error:
"message": "(#100) Required parameter user was not provided",
"type": "OAuthException",
"code": 100,
The documentation still: https://developers.facebook.com/docs/graph-api/reference/v2.9/page/blocked
How to make it work?
I had to change two things in order to make it work:
As the user ID came from my app, it is considered an 'app-scoped ID' (asid)
For blocking, the expected parameter is an array of IDs
POST 123pageid456/blocked?asid=[123userid456]
I got the same error, and filed a Facebook bug: https://developers.facebook.com/bugs/700023220191487/
It turns out the API does not currently support page-scoped IDs from the messenger platform. Only page IDs for the Facebook page.
I have tried all possibilities to get insights for a media post posted in instagram.
That's the post which I am trying to get insights for-
https://api.instagram.com/oembed/?url=https://www.instagram.com/p/BUs4jxfAtIs/
Clearly endpoints provided by instagram are not sufficient to get any kind of insights data.
And when I try graph api
v2.9/1525843122691691052_5512691375/insights
I receive an error:
{
"error": {
"message": "(#803) Some of the aliases you requested do not exist: 1525843122691691052_5512691375",
"type": "OAuthException",
"code": 803,
"fbtrace_id": "A64kR4gnbfC"
}
}
Is this even possible? Has anyone been able to do this? The documentation does not help much and looks like not to be up to date.
I am using facebook graph api to get user message
I try to get shares object from messages sent between two users.
According to Facebook documentation I should use the method /{message-id}/shares https://developers.facebook.com/docs/graph-api/reference/v2.2/message/shares
But when I tried this with a user with read_mailbox permission I get the following error:
{
"error": {
"message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api",
"type": "GraphMethodException",
"code": 100
}
}
so what I have to do to get shares and attachments
thanx in advanced
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 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.