Get musicians/band verified facebook pages - facebook

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())

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 user like of link using facebook api

I am trying to get user's like from a given link-
for example my link would be- "http//:www.example.org"
Now trying to get whether user has liked this link before or not.
FB.api({
method: 'fql.query',
query: "SELECT uid from object_id WHERE uid = " + user_id + "and link_id =" + page_url
}, function (rows) {
console.log(rows);
});
But this query doesn't shows undefined in console.
I want to know the way of doing this using facebook graph API reference.
Afaik you can only get Likes of Facebook Pages via the Facebook API, but not Likes of external websites. Also, keep in mind that FQL is deprecated and only available in v2.0 of the Facebook API. Which means, it will get removed when support for v2.0 runs out (2-3 years probably).
Getting the Facebook Page Likes is pretty easy though: /me/likes ... Although, you need to let Facebook review the permission in v2.0.
Upgrade guide (v1.0 > v2.0): https://developers.facebook.com/docs/apps/upgrading/
There is one way to check if a user liked something on an external website, but only right when he clicks on the Like Button: https://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/v2.0
Edit: After some testing, i figured out that it is indeed possible to get the Likes. Although, i think there is a bug in FQL - You can get a list of external Likes with the following FQL query:
SELECT url, user_id FROM url_like WHERE user_id = me()
...but if you add the url to the query, the result is emtpy:
SELECT url, user_id FROM url_like WHERE user_id = me() AND url = '...'
There is a similar question on stackoverflow btw, maybe you want to take a look at the answers: Retrieve Facebook users that like a URL / web page via Open Graph

How to get the like list of open graph object?

Recently I have created several facebook like button, each of them use iframe and href to link with an open graph object url. Then url will redirect the user into the facebook apps.
But, how can I get the like list from these open graph object? I have pass the urls into fql debugger and want to get the like list, it return nothing. Then I use graph API to check my open graph object page, it return the normal data without the like array list.
So now I cannot get the user id and their name, and I still don't know why I cannot get this... I saw some webpage in the facebook sample that can get the like list. This really make me down.
Due to privacy policies, there is no real way to extract this information.
You might get the friends list who liked the link, try this
SELECT user_id FROM like WHERE object_id IN (SELECT link_id from link WHERE url = 'YOUR URL HERE') and user_id IN ( SELECT uid2 FROM friend WHERE uid1 = me() )
You can use this query to get the fan count of your page.
select fan_count from page where page_id = 'page_id'
You can't list down all the users of your page. Instead you can check if a particular user is your page's fan or not using this query.
select uid from page_fan where uid = 'user_id' and page_id = 'page_id'

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

Obtaining Facebook Likes for Multiple Users using FQL

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