Simple PHP Facebook scripts

About the client


Posted on Jan 07, 2012 / Est. budget $ 50 / Project closed


I have a Facebook page that has a lot of fake profile fans on it. I need two scripts that will help me identify which fans are fake and remove them from my page.

There two scripts required: (1) the FanLister and (2) the FanRemover


** FanLister **
- I want a PHP script that I can run on my mac and call (Get request) from my web browser like this:

** FanRemover **
- I want a simple web form that has one textarea input box and a submit button. The textarea input box will allow me to input Facebook IDs separated by a smicolon


** FanLister **
- The fan lister will use the Facebook graph API to get all the users that like my page, ie:[PAGEID]/members?limit=500&access_token=[oauthtoken]

- The fan lister will then fetch the following information for each user:

first_name, last_name, locale, updated_time, timezone, education, hometown, location



- The fan lister will then compare the friends of each user and that user's ID with the friends of every other user to determine if there are any friends or mutual friends

** FanRemover **
- The fan remover will use the Facebook graph API to block the list of users submitted in the form, ie[PAGEID]/blocked


For both scripts I want simple logging I can tail to check the status, eg:

FanLister 2012-01-10 13:05:01 Sending request returned OK
FanLister 2012-01-10 13:06:01 Sending request returned OK
FanLister 2012-01-10 13:07:01 Sending request returned OK


** FanLister **

I want a Windows CSV file generated, see example attached.

"friends" is the list of ids that like the page AND are friends with this user
"mutual friends" is the list of ids that like the page AND have friends in common with this user

Notice that fields with multiple/listed values shoudl use a semi colon to separate values.

** FanRemover **

No output required


This does not need to run quickly, there should be a sleep/pause of at least a few seconds between requests. I do not want to overload the facebook api

It might be better to do batch requests, see:

This MUST be thoroughly tested first before I receive it

Project bids (2)

Bids are visible only by project owner and Premium members.