Query multiple facebook posts insights - facebook

I'm now querying a post's insights with
/$postId/insights/post_impressions,post_impressions_unique
but if I want to have the insights of multiple posts, is there a way to achieve that with a single api call?

I've found that you can query the insights of multiple posts with a GET request like
/insights/post_impressions,post_impressions_unique?<id1>,<id2>,<id3>...
however you can reach the url length limit for GET requests, if someone knows a POST version that works it would be better

Related

Facebook Post Insights for personal feed?

Is it possible to fetch /me/feeds or /me/posts while getting some insights like impressions or reach?
For example, this query will at least give me likes and shares:
/me/posts?fields=likes.limit(0).summary(true),shares
What's missing is something like impressions.
The Graph API Explorer shows me an insights field, but that doesn't seem to work. I found this query that actually executes, but returns no additonal field or info: /me/posts?fields=insights.metric(post_impressions_fan,post_engaged_users)
My goal is to read the personal posts of a user and provide him insights about his reach (like common analysis tools do for Pages). For that, I'd need a handy way to fetch posts along with their insights. If that won't be possible, it's still acceptable to get insights from specific personal posts.
Thank you for any help / advice

Facebook: is it possible to get insights of impressions for a specific OpenGraph object?

my app is generating OpenGraph objects for users and I want to give those users analytics for their objects (total impressions, clicks, etc..).
I tried using the graph API to get those insights with https://graph.facebook.com/APP_ID/insights but I don't see how I can filter the results by a specific OpenGraph object.
is it possible to do what I'm looking for?
You can pull, for example, insights data for individual posts as follows:
First, get the list of posts for a page:
/<pageId>/posts
Then for each post get the insights which will look something like this:
/<pageId>_<postId>/insights
Note: It's best to batch call the post insights into one request.

Get list of user's friends which contain other app post in their feed

After reading all facebook docs and google search i am posting this question because i unable to find the answer.
Application A - my application
Application B - Someone else application
I want to test user's friends who's feed contain post by Application B. I just need true or false without fetching their posts. because fetching feeds of every friend is slow and wrong way. is their any way to get list of friends in true or false way. Please suggest any single Graph API or FQL to get list.
thank you. Please help.
No, there is no straight “true/false” query for that.
You could just filter the contents of the FQL stream table by app_id for each friend, and use LIMIT 1 to break the search off when the first post made through that app for that user is found.
And of course you could make that a multi-query, to fetch the data for all friends at once, to limit the number of necessary HTTP requests.

Facebook API retrieve "All activity"

I'm looking for a way to retrieve the equivalent of what's shown on https://www.facebook.com/me/allactivity. Both FQL & Open Graph are fine.
On the graph, /me/feed shows something similar, but it's missing likes, and tags and other things.
Any ideas are appreciated.
This is currently not possible. There is no endpoint to get to this data.
The only available data will be anything that appears as a post (e.g. Youtube, Twitter). For this you can query stream via FQL. You can also try endpoints /music.listens and /video.watches but they will retrive data for the current application not all.

Why Facebook Graph Api or FQL does not work for high traffic pages?

I am having this problem. When I try to get the links posted by the user or page it works fine for all, except for high traffic users or pages like 'thebeatles' or 'ladygaya' or'machaeljackson' etc.
One thing we found out was that when you fetch links through graph api, it gives all the comments and evrythign back. In case of celebrity pages, there are thousands of comments, whcih are returned back, and cause to throw a curl exception.
So we switched using FQL and its better as it just provides the links, but in this case also FQL does not work for celebrity accounts. We just can't seem to understand why?
Did anyone come across this problem or know of any way to solve this?
Is it possible that you're trying to retrieve so many comments that it's timing out on Facebook's side?
Have you tried asking for a subset of the comments using offsets or timestamps? Check the 'searching' section of https://developers.facebook.com/docs/reference/api/ for more information
(disclosure: I work for Facebook in the Developer Relations team)