Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Convert Facebook New Search to Graph or FQL

I want to convert this request

  • https://www.facebook.com/search/110970792260960/events-near/

to a request that I can use with Facebook SDK, for example:

  • https://graph.facebook.com/fql?access_token=X&q=SELECT ....

or

  • search?type=event&center=Y&distance=Z

I've tried a FQL like this, unfortunately this query only return events WITH pages associated. I've tried filter the latitude and longitude from venue struct of Event but again I need to specify the ?q= parameter which reduces my results.

For the second option I can't because parameters center and distance doesn't work with type=event.

like image 558
Maicon Carraro Avatar asked May 16 '15 15:05

Maicon Carraro


People also ask

Why Facebook API is called as the Graph API?

It's an HTTP-based API that apps can use to programmatically query data, post new stories, manage ads, upload photos, and perform a wide variety of other tasks. The Graph API is named after the idea of a "social graph" — a representation of the information on Facebook. It's composed of nodes, edges, and fields.

Is there API for Facebook?

What is the Facebook API? The Facebook Graph API is an HTTP-based API that allows developers to extract data and functionality from the Facebook platform. Applications can use this API to programmatically query data, post in pages and groups, and manage ads, among other tasks.

What is fb Graph?

A Facebook Graph API is a programming tool designed to support more access to conventions on the Facebook social media platform. The core of Facebook's platform is something called the "social graph," which is the element responsible for facilitating all of the online relationships between people, places, things, etc.


1 Answers

FQL is deprecated and can only be used in older Apps, but you can use the search endpoint of the Graph API to search for events: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.3#search

Afaik this does NOT allow you to search for events in a specific area though. That´s just not possible with the API.

like image 50
andyrandy Avatar answered Nov 11 '22 07:11

andyrandy