Facebook: How to get fanpage by domain search? - facebook

I would love to get the Facebook fanpage for a domain with the Facebook Graph search.
I tried the following, but only got a random id but not the pages id?
https://graph.facebook.com/?domain=stackoverflow.com
Question:
How to get the Facebook Pages Name or ID when i only have the url to query for?
Does the id from the above graph search help?

You can do it with this the Graph API search:
https://graph.facebook.com/search?type=page&q=stackoverflow.com

Related

Display Facebook Graph API likes count in my site

I'm using fields=fan_count in the Facebook Graph API to get the number of likes from my facebook page, but i don't know how to display the counter in my site.
That is the URL:
https://graph.facebook.com/gamersaction/?fields=fan_count&access_token=access_token
The URL is returning the number of likes and the id of my page:
I want to display only the fan_count field, how can i do it?
You can't, id is the primary key.

Facebook api likes

I need to know if that's possible using the Facebook API?
Get everyone that liked my page (Less than 50 people)
Get all the pages they liked
Query to see if any of the people that liked my page liked my competitor page as well?
thanks,
Answer:
No way. Reference: graph api - retrieve list of likes of a page
Request https://graph.facebook.com/{user-id}/likes endpoint. Documentation: https://developers.facebook.com/docs/graph-api/reference/user/likes/
Request https://graph.facebook.com/{user-id}/likes/{page-id} endpoint. Documentation: https://developers.facebook.com/docs/graph-api/reference/user/likes/
3.1 Request FQL to check multiple userid in only one API call, for example, if one of the user id from the list (e.g. 4,5,12345,777) have liked the page, it would return the relevant user id, i.e. 12345 as shown in this screenshot.
SELECT uid FROM page_fan WHERE page_id = 279183048899677 AND uid In (4,5,12345,777)
Documentation: https://developers.facebook.com/docs/reference/fql/page_fan/
Facebook dismiss FQL after 8 Augsut 2016 Now you need to use only Graph API.

Any way to pull likes by dates from facebook graph api? (New Likes instaed of Global Likes)

I basically need an access to a fanpage's likes by dates, i mean.. not the global likes when you access the graph but the ability to see how much likes the page got yesterday/today..
Any way to do that?
Have a look at https://developers.facebook.com/docs/reference/fql/insights/#page_users - you (by which I mean the user of your app) need to be admin of the page though. You get page_fans, *_adds, *_removes, etc.. On how to execute FQL using the Graph API: https://developers.facebook.com/docs/reference/fql/

Facebook Graph API: How do I get a user's (or own) link-likes (i.e. 'user likes a link')?

By link-like I mean a generic page on the Web (link) that a user likes using a Facebook button (i.e. NOT a Facebook standard page).
The Graph API method /user/feed does not return link-likes.
The Graph API method /user/likes only returns Facebook page likes, but not link-likes.
Do you know of any ways that I could get to link-likes?
When you get this kind of entry you get and id something like:
"id": "1392236262_349397875123264"
The first part of id is user id, the second is the liked link id. You can get an information about it by running other Facebook Graph API call:
https://graph.facebook.com/349397875123264
This way you will get all information about this link.
You can get list of liked urls using fql:
SELECT url FROM url_like WHERE user_id = me()
http://developers.facebook.com/docs/reference/fql/url_like/

Get access to photos' tags on Facebook with Graph API

It's possible to get access for tags on friends' photo from facebook app? Lets assume I have friends_photos permission.
edit:
If yes, how to do it using Graph API? How would I know on which photo is tag I have got from Graph API?
FQL the photo_tag table.
You can graph FQL with:https://api.facebook.com/method/fql.query?query=QUERY
Read more on documentation.
Yes,
take a look at:
photos.getTags // Returns the set of user tags for all photos specified.
more at:
http://developers.facebook.com/docs/reference/rest/photos.getTags/