Pull the likes and comments of a post using Graph API - facebook

I need to pull the likes and comments of a post in Facebook using Graph API. I found out that Facebook does not return the data as a whole but returns in pagination format.
IS there any way to get the likes ad comments data of a post at once instead of getting in pagination format?
If not is there any other where we can get maximum data per page so that we don't have to loop through many pages to obtain the data?
Please suggest!

Related

Get Visitor Posts from Facebook Graph API

I am fetching feeds from the following link:
https://www.facebook.com/wellsfargo/
I want to extract data from "Visitors Posts" section. Using facebook Graph API, it returns me feeds only from individual users. I want to get those feeds too in which above page is mentioned
its available in latest version of graph API. see here.
/v2.11/{page-id}/visitor_posts
Shows all public posts published by page visitors on the page. in case if you are calling below graph api v2.7 you will get this data with /{page-id}/tagged.

How to get public posts by others on facebook page using graph API?

As of now FQL will no longer be available and cannot be queried. I want to filter my /page/feed api call results to only page posts by others. currently i am getting posts by page as well as by others using /page/feed api call

Is there an equivalent to "user_likes" for comments for Posts within a News Feed using Graph API?

I have not been able to find any information that indicates that there is a similar way to get the information for whether or not the user associated with the access_token that is making a request to .../me/home?… to get News Feed posts likes each post in the return from the FB Graph API call. For comments there is a "user_likes" field that can be retrieved for a comment within a post, but I cannot (without error/failure) request "user_likes" in the comma delimited list of fields for the feed as in ".../me/home?fields=user_likes,…
From what I can see, the only way I can determine if the user likes each post is to compare the user's Facebook ID to the id of each of the likes for post. This is problematic in that many of the posts returned in the Graph API request return a subset of the likes with paging likes to get additional likes.
Has anyone found a way to solve this problem? I do not want to use FQL, and am aware that similar posts to this have received FQL solutions in response.
Thanks,
Joe

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.

Graph API returns empty data set for App Insight Data

I am trying to get App Insights like Post Impressions, Clicks etc from my FB App Insight using Graph API and FQL but not getting any data. There response has a Empty Data array.
Any pointers on this?
Also, what would be the FQL to get the number of impression for any story by an app.
One thing I know, for some insights about a post of a Facebook fan page, a page needs at least 30 users(likes).
Then after one day your page insight data maybe showing up.