How to pull the top checked in places using FQL? - facebook-fql

Is there anyway to pull up the top 10 places that are checked into using FQL?

This is not possible. You can only query FQL by indexed fields - like by user id and page id. Not query by other properties.

Related

Get all latest entries in users news feed

Does anyone know of a way to retrieve the users entire news feed? Querying /me/home does filter some stories from. Also, it seems to retrieve the top stories. Is there any way to retrieve the latest stories?
It doesn't matter whether it's through the Graph API or FQL.
me/home is pulling posts in order of created date on my end
https://developers.facebook.com/tools/explorer/135669679827333/?method=GET&path=me%3Ffields%3Dhome.limit(20).fields(created_time%2Cupdated_time%2Cid)
try this as your query, you can mod fields to include any you need.
me?fields=home.limit(20).fields(created_time,updated_time,id)
if it is still out of order because of your cookie settings from the actual home feed, you can force it to reorder by passing the array in sort(); "php".
for sort() refer to: http://php.net/manual/en/function.sort.php

How to get the "shares" of a wall post with FQL

I can't find them in the "stream" table, nor if with a "link_stat" query... any solutions ?
I think there is no such table (like the "like" table) in fql,but if you want to query the share count, you can retrieve it from the graph api without fql (see here for a share count example). Unfortunately, there seems to be no option yet to get the user or user-ids who shared a facebook object, just the share-count. Correct me if i´m wrong..
You can get them via "link_stat" table.
https://developers.facebook.com/docs/reference/fql/link_stat/

Graph API - Get latest news feed entries instead of "top news"

I'm working on a module to my web application which is supposed to display latest news feed entries for a specific user.
I was wondering if it's possible to add a certain "orderby" parameter to the graph api url in order to fetch the "latest news" instead of facebook's default "top news" which arranges the order using popularity and other elements.
I'm currently using the following url:
https://graph.facebook.com/me/home?access_token=...&limit=10
but again, this does not return the latest entries.
Does anyone know how to solve this?
You can use FQL rather then Graph to query the "stream" table. FQL supports order by statements similar to SQL. http://developers.facebook.com/docs/reference/fql/
For your specific example it would be
SELECT post_id FROM stream WHERE source_id=me() ORDER BY updated_time DESC
Obviously you will want to query more then just the post_id, you can find the full list of fields here http://developers.facebook.com/docs/reference/fql/stream/
Mikey, I've been trying to do the same thing. During my tests I found that the Facebook API didn't return all the entries it was supposed to.
Meaby in some way it's prevent you from seeing all updates correctly.
Try this :
In your browser open : https://graph.facebook.com/me/home?access_token=
then
Go to the Facebook Graph API Doc : https://developers.facebook.com/docs/reference/api/
and click the News feed: https://graph.facebook.com/me/home?access_token=... link in the page.
Check if the two page show the same output.

How to get category specific likes for a facebook user using graph API

I'm pretty new at this. I was playing with the Facebook Graph API and was able to pull all my LIKES using the call
$all_likes = json_decode(file_get_contents('https://graph.facebook.com/me/likes?access_token='.[access_token]));
Now when I display these, they have a field called category which has different values like TV Show, Book, Public Figure etc.
So my question is how do I get category specific likes - for instance I just want to fetch ALL the BOOKS that I LIKE
Obviously its possible to fetch all the likes and store them on the server side and work on it but the LIKES list is too huge for certain users and it doesn't make sense to pull everything if you just want to show a certain category.
I feel like I'm missing something.
If its not possible through the graph API call, then even a FQL solution is welcome.
Thanks for your time
R
You can use FQL, just like in this answer:
SELECT page_id FROM page_fan WHERE uid=me() AND type="MOVIE"

Get top x "likes" using Facebook API

Is there a way to get the top likes of a particular section of a site? For example, I want to get all top x likes of example.com/directory. I'm not particular about which method (Graph, FQL, etc), I just want to find the best method.
We currently do not support prefix queries for URLs or sorting by number of likes. If you have the set of URLs, you can use FQL and the http://developers.facebook.com/docs/reference/fql/link_stat table to get the stats for each of them.