Reputation: 96
I use Facebook C# SDK. I try to make a Facebook search request to retrieve locations without success.
I don't know all the parameters which can be used in a "search" request.
I use this code:
Dictionary<string,object> searchParams = new Dictionary<string,object>();
searchParams.Add("q", "Orange");
searchParams.Add("type", "place");
searchParams.Add("country", "France");
FacebookClient fbClient = new FacebookClient(token);
var searchedPlaces = fbClient.Get("/search", searchParams);
I receive a response with some places everywhere in the world not only in France!! The filters "category" and "country" have no effect.
Which parameters can be used in the request ? Where find the parameters list for a search request?
How to fix parameters "category", "country" and what write in the parameter "q"?
Upvotes: 1
Views: 730
Reputation: 43816
From the Documentation:
The example search for places is given as https://graph.facebook.com/search?q=coffee&type=place¢er=37.76,122.427&distance=1000
- you'll need an access token but otherwise that works fine for me; the response shows Coffee shops centered around those coordinates
{edit} The only search options are
q
for a text based querycenter
(with coordinates) and distance
to specify the approximate locationUpvotes: 1