Possible to get Fan Page Update Information via API? - facebook

I receive an email once a week with information on my Fan Page (like how many more users than last update have become my fan, how many posts, etc). Is it possible to get this info via the FB API so I can show this data where I want outside FB and outside my email?

One of the way is using fql of facebook :
Group FQL Table
After you can get the group ids, you can use the group_member tables to get all members from that group:
Group Member FQL Table
You can even use Graph API if you want but I am not an expert of that

Related

How to get my all facebook posts by group ID

As the fql is deprecated for versions v2.1 and higher, So I am not able to access the data using fql. Is there any way to fetch only my posts by group id.
Please correct me, if Im wrong.
You can get all posts of a group via the GraphAPI endpoint
v2.5/{group-id}/feed
Anyways, you are not able to perform this action if you are not "Admin" of the specific group. You need the additional permission of 'user_managed_groups'.
To drill it down to a specific user query against
v2.5/{group-id}/feed?fields=from,message
Then you have have the users' id and the message. Just iterate of the response and filter out by the user of your choice.

Get most active friends in chat using Facebook FQL

Is there a way to get what are the most active friends in chat via FQL?
There is no count() method in FQL, so no, not directly. You could query the thread table and then loop through the recipients returned to count it in your own script.
If you look at the new unified_message and related tables in the documentation, it appears that Facebook is adding features to the messaging system. You may be able to do this in the future.

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.

Getting Facebook groups

My project is to get around 1000 Facebook groups and do some analysis of the data collected from those groups. Is there any way to accumulate Facebook group ID's (1000 or less) so that I don't have to manually search for each Facebook group. Is there a query or something that allows me to see Facebook groups based on category, etc?
Maybe I don't understand the question correctly, but facebook has a very convenient api for this:
https://graph.facebook.com/search?q=programming&type=group&access_token=lala
It is on the developer page: http://developers.facebook.com/docs/reference/api/
you can use
Batch requests in Graph API to get more ids at once
see https://developers.facebook.com/blog/post/2011/03/17/batch-requests-in-graph-api/

Is it possible to do this with fql

Using Facebook's Graph API, I am currently looping through all friends to retrieve their videos, and then present a list of these videos to the user. It obviusly takes a while to do this depending on number of friends,
Is there any way to just say to FQL - give me all videos that I have permsission to view?
Facebook doesn't want applications to be able to "mine data". They don't want applications to be able to collect that much data on anything they want. In most cases an ID must be specified.
User ID
Page ID
Group ID
Event ID
etc...
Even in such a case there is also limitations and multiple calls will have to be made. The limitations themselves are not only limited to accessing data with FQL or the Graph API.
There are also limitations on your access to the API. This is called application throttling and it can be enforced on your application if they find you doing an abnormally large amount of calls to the API. There are also other limitations such as making multiple sequential posts or even duplicate posts to your users.
I'm afraid that the answer is no.
Just playing around with the graph API explorer:
http://developers.facebook.com/tools/explorer?method=GET&path=fql%3Fq%3DSELECT%20vid%2C%20owner%2C%20title%2C%20src%20FROM%20video%20WHERE%20owner%3Dme%28%29
I know that to get a list of my friends I can do:
SELECT uid2 FROM friend WHERE uid1=me()
I then updated the video query to:
http://developers.facebook.com/tools/explorer?method=GET&path=fql%3Fq%3DSELECT%20vid%2C%20owner%2C%20title%2C%20src%20FROM%20video%20WHERE%20owner%20IN%20%28SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%3Dme%28%29%29
And now I get a paginated list of all videos belonging to my friends. This one query is certainly better than pounding the API to death with multiple calls. :)