How to use Bing's search API?

Can I use Facebook's API to search for pages with a set number of likes?

  • For example, I want to find all the Facebook pages in Chicago with between 1,000 and 5,000 likes. Anything below 1,000, I don't want to know about and anything above 5,000, I don't want to know about. Is this possible with Facebook's Graph API?

  • Answer:

    Simple answer: No, you can't. You can search for pages by search term (which searches the page name and location), but you can't add more parameters to filter the results set by properties like number of fans.To do so you need firstly need to find all pages that are associated with Chicago and then query each page for the current number of fans/likes. That's the only way.

Lars Schwarz at Quora Visit the source

Was this solution helpful to you?

Other answers

Hi, According to the documentation https://developers.facebook.com/docs/graph-api/using-graph-api/v2.4#searching it is possible to perform location based queries for places only (not pages). For example, if you want to find all coffee places in a radius of 50km from Chicago you should perform the following request: https://graph.facebook.com/v2.4/search?access_token=<your_token>&type=place&q=coffee&center=41.8369,-87.6847&distance=50000&fields=id,name,category,likes Then you need to iterate over the results using 'next' attribute (look for 'Traversing Paged Results' in https://developers.facebook.com/docs/graph-api/using-graph-api/v2.4 ) and filter out places according to 'likes' attribute. Sasha

Sasha Korman

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.