Obtaining Facebook Likes for Multiple Users using FQL - facebook

I'm trying to replicate the results of the graph api call:
graph.facebook.com/[fbid]/likes
using FQL so that I can obtain the likes of multiple people using a single call. Anyone know if this is possible / how to do it?

FQL can supposedly support multiqueries. Check out this page:
FQL Multiquery
which says:
"query2":"SELECT name, url, pic FROM profile WHERE id IN (SELECT uid FROM #query1)"

You can use SELECT page_id,name FROM page WHERE page_id IN (SELECT page_id FROM page_fan WHERE uid in (....). Hope this was helpful. I found the answer in this discussion. Since this was one of the first pages I came across, I thought I should link it to the answer

Related

How to get "People Also Like" using FQL or Graph API

As mentioned above, I want to get name and page_URL(website) on People Also Like list using FQL OR Facebook Graph API.
I was making some Query for FQL such as:
select page_id, name, username, page_url, website from page where page_id in (select page_id from page_fan where uid= "")
But it gives Liked by this page not for People Also like
Please give me your kind advices for getting People Also Like lists.

Get musicians/band verified facebook pages

How do I query Facebook to select only verified band/musicians pages?
I used Tool explorer https://developers.facebook.com/tools/explorer?method=GET&path=me%3Ffields%3Did%2Cname&version=v2.2 and query this me/music/?fields=category,name,id,band_members but as result I just got all kind of pages not including the official ones.
Is that possible or does Facebook not offer any specific parameter to get this info?
There's currently no way to filter this via the Graph API endpoints. If you can use FQL (meaning you app is a <=v2.0 app), you could use the following query:
select page_id, name from page where is_verified = 'true' and page_id in (select page_id from page_fan where uid=me())

How can I take the like pages from an user of Facebook?

I have a problem. I am using fql to get user information. I want to take the pages the user has liked.
https://developers.facebook.com/docs/reference/fql
I have been investigating all tables, but I have not seen what I wanted.
If you know how can I do it, that would be fantastic.
Thank you!!
You want the page_fan table
https://developers.facebook.com/docs/reference/fql/page_fan
uid should be an indexable field
here's a sample FQL query to get you started
select page_id,name from page where page_id in (select page_id from page_fan where uid=me())
https://developers.facebook.com/tools/explorer?fql=select%20page_id%2Cname%20from%20page%20where%20page_id%20in%20(select%20page_id%20from%20page_fan%20where%20uid%3Dme())

Getting a list of everyone that likes a link.

If I create a page, is it possible to get a list of all the people that like that page on facebook. For example, if I create http://www.facebook.com/honeybadger, as an admin can I get a list of everyone that likes it?
You can't get a list of users who like a URL or Facebook page anymore. Facebook has gone and taken the page_fan and url_like tables and made the only indexable column on these the uid field.
Trying something like this
SELECT uid FROM page_fan WHERE page_id IN (SELECT page_id FROM page WHERE username = "honeybadger")
Throws an OAuth exception: "Your statement is not indexable. The WHERE clause must contain an indexable column. Such columns are marked with * in the tables linked from http://developers.facebook.com/docs/reference/fql"
The only thing you can do is create an app, have users authorize your app, then test if an authenticated user likes a specific page or link. If you ask for the right permissions, you can also test to see if their friends like your app.
This change was implemented to prevent spammers from harvesting Facebook IDs from their page fans or url likers.
The Facebook documentation seems to give the exact answer to your question.
https://developers.facebook.com/docs/reference/fql/like/
SELECT user_id FROM like WHERE object_id = <INSERT_FACEBOOK_OBJECT_ID_HERE>
simpler way is to get it thru graph api
https://graph.facebook.com/honeybadger/likes?access_token=valid_access_token

Getting user's liked pages

I've been digging on Stackoverflow for hours now and found no solution:
I want to get pages that a user liked using the page_fan table.
However, that user is not my friend - is it possible? I think it might be because when i go the user's profile I can see all the pages he liked but not using FQL...Any advice?
Tnx.
Shai.
Yes, that is possible as long as the user gave your app "user_likes" permission. See very beginning of below page:
http://developers.facebook.com/docs/reference/fql/page_fan/
query:
SELECT name, about, description, keywords, pic_cover, pic_large FROM page
WHERE page_id
IN (
SELECT page_id FROM page_fan
WHERE uid =me()
)
This query will return data for each of the pages a user that is using your app has liked.