Facebook Fan page like check - facebook

I would like to see of visitor of my website is already fan of my fanpage.
So if somebody visits my website,i would like to ask him to visit my fanpage only, if he is not fan already.I dont want to ask for permission. Just check, if he likes the fanpage or not.
Is there possibility to do this? I am not experienced in this Facebook API, this is why i ask for an idea for doing this

It can be done using FQL by querying page_fan table, you have to get user_likes permission before doing this...

It is now against Facebook's policies to gate an app or content within an app based on if someone has liked your page.
Use of the user_likes permission will not be approved for use by Facebook via Login Review if you're using it for the purpose of like gating.
In addition, FQL is now deprecated and should no longer be used for new apps.
See the announcement here: https://developers.facebook.com/blog/post/2014/08/07/Graph-API-v2.1/

Related

Facebook share through my website and get likes and shares count only?

I want to create a website where it would be crucial to be able to view the likes and shares of a specific post a user shares from the website.. Is this possible anymore? The flow would be similar to this:
User logs in through Facebook and grants user_posts permission
User then clicks a share button for a specific url with quote content and a hashtag
What I need after those steps are:
ID of the post from sharing
Count of likes, reactions and shares on that post
even better would be a webhook notice of likes/reactions/shares count.
Any ideas? I don't need any private data... just counts of likes/reactions/shares but it's not looking possible anymore.
https://developers.facebook.com/docs/apps/examples-platform-policy-4.4
Don't incentivize people to post content on Facebook, or give the
impression that posting to Facebook will be rewarded
Incentivizing users for posting/sharing something on their personal wall is not allowed, you would not get the user_posts permission approved for that, and that makes it impossible.

How to check if user is a fan of facebook page by Graph API?

I want to check if user is a fan of a specific Facebook page, I have tried searching in Google but I haven't found the answer yet.
I am an admin of fanpage. I am having a promotion program on my page and becoming a fan of my page is a requirement. I want to check if users like my page to give them presents. Because of a large users, I want to create a tool to do it.
Do you have any solutions? Thank you!
You would need to authorize the user with the user_likes permission. That way, you can get his Page likes with the /me/likes endpoint.
Be aware that you are not allowed to incentivize Page likes, users must like a Page only because they really want to, you canĀ“t reward them in any way or gate content behind a Page like.
You can also use /me/likes/{page_id} where {page_id} is an actual page object id as a shortcut.
If the user doesn't like the page, you'll receive a response like
{
"data": [
]
}

See Facebook Likes in Date Order

Is there a way I can see the order in which people like my facebook page? I would like to identify the 5000th like to give them a prize.
Is this possible?
Stuart
No, this is not possible, because you can't access the list of ALL users which liked you page.
You can only access the likes of ONE user once he gave his user_likes permission to your app (if you have one).

How Do I Detect if a User Already Likes My Facebook Page when landing on my site without user_likes permissions

When a user lands on my website I would like to present him with a litebox with the like facebook widget in it. However I only want to do this if they haven't already liked our facebook page.
I want to make this process seamless so I dont want to have to ask for permission first.
I read somewhere that if its for your own sites FB page, then you dont require this.
But cant find any more information other than a person stating this in the stackoverflow.
Any help much appreciated.
thanks
andy
You would need to go through the review process with the user_likes permission. Facebook will not approved user_likes for that, because like gating is not allowed anymore.
It was possible earlier to check if a user liked a Page directly in a Page Tab/App, but that flag was removed.

How can I get the details of all fans of a Facebook page?

Suppose that I am the administrator of a Facebook page, I want to get all of the profile details of a the people who "liked" my page. Is this possible? How?
So far, I have only been able to get aggregated data through the Graph API. For example, "number of like in the past week".
There are posts that claim that I can do this with the FQL API, but the documentation for the FQL seems to have been hidden on FB developer site.
FQL reference is not "hidden", it's here: https://developers.facebook.com/docs/reference/fql But there's no current official way to get the profile details of your Page's liker, because you'd need the permission to query the user data from the users.
There are some "hacks" as denoted at Facebook API: Get fans of / people who like a page for example, but it's strongly advised that you don't use these. Facebook forbids scraping for example, and once Facebook changes its website, those methods are likely to stop working.