Fetching activity feeds of all the users together in a request - facebook

I have a facebook application which posts on users activity feed as soon as the user uses my website. I am also trying to show the activity of users' friend on my website. For this , I am fetching back the feeds being posted by my application on facebook for his friends.
However, the problem is , in the first request , I am getting the list of all the friends of the respective user who have installed my application. Once, I get this list, I am able to get his friends, however, only one at a time.
So, if a user has 50 of his friends using my website, it will take 50 request to show him his friends activity. Is there a way in facebook open graph to fetch the list of all feeds of all friends together, or, using least number of requests ?
Please suggest some ways to do the same.

If you are using FQL to grab the data, you can use WHERE uid IN (…,…,…) to select data for more than one user at once.
And with FQL you can do multi-queries, or using the API you can do batch requests; to reduce the number of HTTP requests necessary to get the data.

Related

Determine first 50 likes via Facebook Graph API

Is it possible to get for example the first 50 people who liked a post, photo, whatever I created on facebook via the Graph API? Is there any kind of order when accessing connections like /likes or /comments?
Use the following link (given that you have permissions to access to the post):
/likes?limit=50
This should be the first 50 likes ordered via Facebook (usually based on time).
ASFAIK, you cannot get a list of people who like a page. It's a privacy issue. If you wanted to create an app, and users authorized your app, then you could get a list of the current users friends who like the page.

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.

Changing the limit of number of activity feeds of friend fetched using graph API at a time

I am trying to have a hold of number of activity posts made by my application on Facebook.
However, Fb returns only 100 activity feeds at a time. So, if a user has lets say posted 200 times on FB. I would have to request twice. Similarly, I would need to do for all of his friends. This is very inconvenient ad inefficient. So, is there anyway to change the limit of number of feeds fetched at a time
Here is the feed sample from one of my users.
Thanks !

Facebook API - Looking for details on individual posts

I'm looking to see if it's possible to pull data from individual posts; listed below. I'm looking to pull this data daily for a business page. From the daily data I want to make a weekly report comparing the last weeks set of data.
The data I'm looking to get is:
Activity / How many times was each indidual post viewed
Posts that lead to a subscription / like
Posts that lead to unsubscribe / unlike
The number of people that have hidden an individual post
Facebook provides api access to the Insights of a page (or application).
You have two ways to access it: the Insights object or the Insights fql table.
Using that you can load statistics about your page using specific metrics, in the fql table doc. the ones that you care about (based on your question) starts in Page Posts and then you have Stories and People talking about this, Impressions and Engagement.
According to the fql table doc:
To read insights you need
read_insights permissions for all apps, Pages and domains owned by the current session user
Which means that you won't be able to just run a program once a day to collect this data since you'll need an active token for a user that has access to the insights data for the page and has authorized your app and granted the "read_insights" permission.
You can make sure that the user use your app while you authenticate him using the Server-Side auth flow, which will results in 60 days token, save that and you can run that program daily for the next 60 days.
When the token has expired the user will have to again use your app to authenticate and create a new valid token.

Facebook Insights API - App News Feed counts for Impressions and Clicks

I have been exploring the Facebook insights FQL table, and I assumed I could get to all of the data which is available via the insights dashboard from the FB app admin.
However, I am having trouble figuring out how to get the data shown on the "Insights > News Feed" set of reports. Particularly, I am trying to get to the stats of the feed stories generated by my app.
Is it possible to get to this data right now? I can't seem to find it.
Try to use insights connection for Post.
The User, Page, Application and Group objects have feed connections containing post objects that represent their walls. In addition the User and Page objects have a connection named posts containing Posts made by the User and the Page respectively.
A post from Facebook Platform: https://graph.facebook.com/19292868552_10150189643478553