Checking which users have liked a Facebook page - facebook

I've been researching this for a couple of days and I'm seing a lot of answers to similar questions and they are unfortunately all "No, you can't do that." So, perhaps you can help me find a more efficient way or perhaps you have a better answer.
I'm running a game at an event. When users sign up for my game, they'll authorize my Facebook app. They get points in my game for doing certain things. One of the things they get points for is Liking a chosen Facebook page.
They don't Like the page through any interface I control though, so I'm going to be running a process in the background which checks if my authorized users have liked the page.
I'm going to have tens of thousands of people playing this game though. I've got an access_token for each of them and I know I can fetch a list of likes for Person X with their access_token, but fetching 10,000+ lists of likes to check if they've liked the page seems ridiculous... especially since if they haven't liked it, I can't just cross them off the list. I need to keep checking every few minutes for the duration of the event just to see if they have liked the page yet and give them points. Once they have liked the page then I no longer need to keep checking them, but that's still going to require a ton of requests.
Is there a way that I can determine which of my 10k+ users, for whom I have individual access_tokens, have liked my page?
Or can I get list of people who have recently liked a particular page?
Any other suggestions?
EDIT: As the administrator of my FB page, I can use the website to just click through and I can see all of the people who have liked my page, so I feel like there should be some way to access this information programmatically as well. Am I just missing something?

This problem seems like a candidate for using FQL. There's a table called page_fan that acts as a join table between the user and page tables. You could run a query for each user to see whether a row exists for the chosen page. For example:
SELECT 1 FROM page_fan WHERE uid = me() and page_id = 8484927467

I'm running a game at an event. When users sign up for my game, they'll authorize my Facebook app. They get points in my game for doing certain things. One of the things they get points for is Liking a chosen Facebook page.
Please clarify some details on that:
is your game app running as a page tab app inside facebook, or some place else?
if it is running in a page tab, is that also the page they are required to like?
If that would be the case, you would get the info if the user has liked the page within the signed_request parameter automatically, no further API queries etc. necessary.
fetching 10,000+ lists of likes to check if they've liked the page seems ridiculous...
Keep in mind that you don’t have to go through each user’s list of likes, though – you can ask if someone liked a specific page by querying for /userid/likes/pageid. (I know, it’s still one request for each user.)
I need to keep checking every few minutes for the duration of the event just to see if they have liked the page yet and give them points. Once they have liked the page then I no longer need to keep checking them, but that's still going to require a ton of requests.
Are you aware of the method in the JavaScript SDK of binding an event to a user clicking a like button on your page? Maybe you could use that – implement the like button in your site, catch the event of the user using that very button to like the page … and then AJAX the fact that the like happened to your server, maybe make one more request for that particular user to verify that there’s no “cheating” involved (someone making a call to your AJAX endpoint themselves, without actually having liked) … and you should have what you want, right?

Hey guys go to the BANNED USERS panel at your page settings and select PEOPLE WHO LIKE YOUR PAGE. Thanks

Related

seeing who liked a page programmatically

So my company has a facebook page and they're wanting to pay the sales people bonuses based on how many of each of their customers liked my companies facebook page.
To do that right now someone in our marketing department is manually going through, getting the names, and doing queries one-by-one, to see if the person who liked the page is a customer and if so who's customer they are.
That seems excessively tedious. My question is... is there a way to automate that? I don't see anything in the Graph API / Page stuff that'd let you do that:
https://developers.facebook.com/docs/reference/api/page/
For that matter I'm not actually entirely sure how our marketing person is getting the names of people who liked the page. When I view the page I just see who, among my friends, liked the page. But then again they are an admin whereas I'm currently not (although I could get it fairly easily if I can show how my having admin access would be of benefit [and this would qualify I'm sure]).
Any ideas?
Short answer, no. You can't see who liked your page programmatically, you can only see manually on your facebook page if you go to the new likes section.
You can create a page app that when a user likes your page it prompts him to insert his information or something like that, but then again you won't capture the likes that are made directly on your page, only the ones made inside de app

Facebook will not allow me to post to a user's wall without a dialog. How can causes.com get away with it?

I have an app that allows users to share the page to specific users by clicking on check boxes next to their name and then doing a bunch of posts. I received an alert in February that said I would not be able to post to friends' walls unless there is a dialog box.
However, I noticed if you sign a petition on Causes.com, they do something very similar where they post the petition to a bunch of friends' walls.
I'm curious how they get away with that. Maybe I'm not familiar enough with the Facebook API.
I'm not sure if this helps, but Facebook does have business partnerships with certain sites/companies that have more privileges to their api keys, facebook app. This could be one of these instances.
One instance of this is, when you go to a major site and the site is able to read your facebook session, and within that site they show your name and picture once the site is rendered. In essence, these sites already know who you are.

Starting with facebook app (need guidelines)

i'm trying to make a facebook app, to make draws (like raffles) between the users who like my fan page, or eventually who likes a post.
I've been developing another app which do other stuff, but i'm stuck with this and it's really frustrating to not be able to do something so simple as this.
In the first place, i wish to make it available in a page tab (and that users doesn't need to "install" the app. Maybe this isn't needed if the user is just "looking" at a page that is loaded in my hosting)
Second, i don't know how could i get (assuming the one who enters the app/page tab is an admin) all the users who liked the page/post without using an access_token (because this damn access_token has an expiration time, and if i could, i'd try not to use an access token at all, since i assume the user who gets in into some parts is an admin
Any ideas?
You can't make an app that draws a contest winner from the people who like your page. Facebook does not allow you to query the fans of your pages anymore.
You can still query the users who like a post on your page though so you should set your contest up this way.
To get started, you'll need to create a connector app for your page. Users don't need to register for this app. As long as they like your page, your app will be able to access their public data. Your app will have an API key and secret. Using these, you'll be able to access information about your page.
To find a user who liked a post, you can query this with a variety of languages. I'm not sure which one you are using, so I'll give you instructions to do this from the Graph API Explorer: https://developers.facebook.com/tools/explorer
Make your post on a page, and type PAGE_ID_OR_USERNAME/feed where you replace PAGE_ID_OR_USERNAME with your page's id or username. Find the id of the post you just listed in there. It will look something like this: 213365490637345_40261112079719 (not a real post_id)
Now you can get all the user ids of people who liked that post by typing this into the explorer box:
fql?q=SELECT user_id FROM like WHERE post_id = "213365490637345_40261112079719"
And then choose a random id from that list and contact that particular user. You may have to use Facebook as your page when you try to contact them.

How to create a list of content in a page that can be fan only voted (one unique vote per fan) and counted?

Maybe this is a really basic question but I have never done something with facebook before and I need to get this done in a matter of days, so I just need some guidelines and your help is crucial.
I'm running a contest and I need to have during a public vote phase a way of fans of my page vote on the submissions of the contesters. The vote must be unique and I need to have the number of votes in each item counted and display.
I think this is pretty straight forward but I don't even now how to start: should I develop a facebook application, or just a landing page with some code on it.
You'll need an application that authenticates the user. In other words the user will have to connect with your app. This will give you access to the FBID which you can then use to check to see if the user has already voted. As for keeping track you'll probably need a database to store the votes in. Without authentication the most you'll be able to tell is if the user has liked the current page the app is installed on.

How do I find out the number of X fan on a facebook page, and if they were referred, if so, by whom?

Background: My employer is running a contest and wants to find out who the 1000th person to 'like' the page is, and if they were referred by someone. Is that functionality build in already, or does an app have to be written to find out this info?
There's no way to get a list of page fans or the order in which they became fans, but you can track new fans who like your page via capturing the edge.create event in the javascript API when they click the Like button.
You could also check the current like count to come to some sort of conclusion about which order users became fans and which 'number' fan they are
I must point out though that running such a competition is expressly forbidden by Facebook's promotion guidelines: https://www.facebook.com/promotions_guidelines.php