Facebook API script

IN PROGRESS
Bids
6
Avg Bid (USD)
$140
Project Budget (USD)
$30 - $250

Project Description:
I need a script using Facebook API

PART 1

I need 2 text boxes where I can enter the and coordinates.

Combine the following 3 queries into 1 batch request to the facebook graph API:

/search?q=club&type=place¢er=,&distance=50000&fields=id&limit=1000
/search?q=nightclub&type=place¢er=,&distance=50000&fields=id&limit=1000
/search?q=bar&type=place¢er=,&distance=50000&fields=id&limit=1000

Refer to https://developers.facebook.com/docs/reference/api/search/ for information on the Graph API search function
Refer to https://developers.facebook.com/docs/reference/api/batch/ for information on batching

Combine the results from the batch request and remove any duplicates to create $place_list

Take $place_list and use it in the following query using facebook FQL Query:

SELECT categories, fan_count, location, name, page_id, pic FROM page WHERE page_id IN ($place_list) ORDER BY fan_count DESC

Refer to https://developers.facebook.com/docs/technical-guides/fql/ for information on using Facebook FQL Query
Refer to https://developers.facebook.com/docs/reference/fql/page for information on the page table

Take results from the above query and remove any results that do not have any of the following categories.name: club, night club, dance club, bar

Take the first 100 results to create $place_list_100

Display the results

PART 2

Use $place_list_100 and use the name field of each result for the following queries:

/search?q=&type=event&limit=100
/search?q=&type=event&limit=100
/search?q=&type=event&limit=100
...
/search?q=&type=event&limit=100

Combine the above queries into batch requests. Facebook only allows a maximun of 50 queries for each batch request so you will need to make 2 batch requests. One

batch request will use the first 50 names in $place_list_100 and the second batch request will use the 51-100 names in $place_list_100.

Combine the results and filter only events whose location field is an exact match of any one of the names in $location_list_100 and whose start_time field is

within the next 30 days and create a list of just the eid field to create $event_list

Use $event_list and use it in the following query using facebook FQL Query:

SELECT attending_count, eid, location, name, description, pic, pic_square, start_time, venue FROM event WHERE eid IN ($event_list) ORDER BY attending_count DESC

Refer to https://developers.facebook.com/docs/reference/fql/event for information on the event table

Display the results

Additional Project Description:
02/17/2013 at 22:35 EST
Some of the text is missing from the initial details. Here it is again:

PART 1

I need 2 text boxes where I can enter the (latitude) and (longitude) coordinates.

Combine the following 3 queries into 1 batch request to the facebook graph API:

/search?q=club&type=place&center=(latitude),(longitude)&distance=50000&fields=id&limit=1000
/search?q=nightclub&type=place&center=(latitude),(longitude)&distance=50000&fields=id&limit=1000
/search?q=bar&type=place&center=(latitude),(longitude)&distance=50000&fields=id&limit=1000

Refer to https://developers.facebook.com/docs/reference/api/search/ for information on the Graph API search function
Refer to https://developers.facebook.com/docs/reference/api/batch/ for information on batching

Combine the results from the batch request and remove any duplicates to create $place_list

Take $place_list and use it in the following query using facebook FQL Query:

SELECT categories, fan_count, location, name, page_id, pic FROM page WHERE page_id IN ($place_list) ORDER BY fan_count DESC

Refer to https://developers.facebook.com/docs/technical-guides/fql/ for information on using Facebook FQL Query
Refer to https://developers.facebook.com/docs/reference/fql/page for information on the page table

Take results from the above query and remove any results that do not have any of the following categories.name: club, night club, dance club, bar

Take first 100 results to create $place_list_100

Display the results

PART 2

Use $place_list_100 and use the name field of each result for the following queries:

/search?q=(1st name from $place_list_100)&type=event&limit=100
/search?q=(2nd name from $place_list_100)&type=event&limit=100
/search?q=(3rd name from $place_list_100)&type=event&limit=100
...
/search?q=(100th name from $place_list_100)&type=event&limit=100

Combine the above queries into batch requests. Facebook only allows a maximun of 50 queries for each batch request so you will need to make 2 batch requests. One batch request will use the first 50 names in $place_list_100 and the second batch request will use the 51-100 names in $place_list_100.

Combine the results and filter only events whose location field is an exact match of any one of the names in $place_list_100 and whose start_time field is within

the next 30 days and create a list of just the eid field to create $event_list

Use $event_list and use it in the following query using facebook FQL Query:

SELECT attending_count, eid, location, name, description, pic, pic_square, start_time, venue FROM event WHERE eid IN ($event_list) ORDER BY attending_count DESC

Refer to https://developers.facebook.com/docs/reference/fql/event for information on the event table

Display the results


Skills required:
Facebook Marketing, PHP
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


$ 200
in 3 days
$ 80
in 1 days
$ 300
in 5 days
Hire PrajwalShetty
$ 90
in 1 days
Hire tolyadouble
$ 70
in 1 days
$ 100
in 1 days