Need retrive the posts for particular location using graph api in facebook. At present I am using the below URL to find public posts, parameters are access token, lat, long and buffer distance, but this url returns the all the posts irrespective of lat long and buffer distance https://graph.facebook.com/search?q=lunch&type=post¢er=17,78&distance=100&access_token=xxxx
Please suggest me if any options available in graph api to fetch the post or messages for particular location
Related
I have a question about Facebook Graph API.
Here are two FB photo objects with geo location, in the first photo, the geo location is "Rio Douro", and the geo location in the second photo is "Santa Clara, Portugal 附近".
I know I can use graph API like "{photo-id}?fields=place" to get the location info (Rio Douro) from the first photo.
http://i.stack.imgur.com/drnMQ.jpg
But how can I get the location info from the second photo?
"{photo-id}?fields=place" won't return anything....:(
http://i.stack.imgur.com/8VWsP.jpg
Thanks in advance for any help!
You cannot, that information is not part of the Photo's details but is general information attached to the post; it's not retrievable via the API
I want to get the public post from user only. For example when I run below query -
https://graph.facebook.com/search?q=buy+AND+nokia+AND+lumia&limit=100&type=post
I get post from category = community. I want to get the post from users only not communities. Is there way to filter the results
1)I want to fetch the venues for the nearby location by passing the latitude and longitude of to the API in foursquare.
I got this url:-thisand i got peroper response.
But for this latitude and longitude:- 32.3456,141.4346
(url)
I did not get any data.
Same for Facebook.I use this :- facebook API
But i want the list of generalized category listing from this API.And this API only gives me data of hotels only.Because i pass q=hotel.
2)How to get oauth_token for foursquare?
Please help me.
The reason you did not get any data for that location is because there are no venues in that area. If you follow this link you will see that location is in a remote area of Australia.
For help with connecting users to Foursquare, you can use these instructions
Need to post status update and attach user location by passing latitude and longitude. In FB docs they say, we need to pass "place" FB entity that is:
"an object containing id and name of Page associated with this location, and a location field containing geographic information such as latitude, longitude, country, and other fields (fields will vary based on geography and availability of information)"
How to create/get such place name from latitude and longitude? I'v read related post1 and post2 but was not able to find a working solution.
How to create/get such place name from latitude and longitude?
There is currently no API available for developers to create Facebook pages or places. However, you can get place name by doing a FQL query like this...
'SELECT page_id,name,latitude,longitude FROM place WHERE distance(latitude, longitude, "LAT_HERE", "LON_HERE") < 250`
250 refers to the radius(m) that it will search within, it can go up to 50000.
Doing this FQL query will return you the Facebook Place Page's id, place name, latitude and longitude.
(Actually there is no need to get the place name as the page_id is what you really need. With page_id, you will be able to get all the information of that Facebook Place Page.)
Need to post status update and attach user location by passing
latitude and longitude.
Assuming you are actually trying to publish a checkin, you can refer to the references below to proceed further with the data you have obtained from the FQL query...
A normal status update(feed dialog) is different from a status update with location tagged to it(checkins), they are using different APIs.
References:
How to get place_id before checkin?
Facebook - Publish Checkins using PHP SDK/JavaScript SDK
Facebook Documentations
Page FQL - http://developers.facebook.com/docs/reference/fql/page/
Checkins API - http://developers.facebook.com/docs/reference/api/user/#checkins
If you have the lat/long data, you can search for the place and get the place-id which can be included in the POST message.
Please check these related posts -
https://developers.facebook.com/docs/opengraph/actions/#taggingplaces
https://developers.facebook.com/blog/post/2012/03/07/building-better-stories-with-location-and-friends/
I am using Facebook Graph API to search facebook POST with location parameter. I am using the below code.
string url = string.Format("https://graph.facebook.com/search?q={0}&type=post&limit=10&location=Newark,NJ,US", txtSearch.Text);
WebClient web = new WebClient();
string xml = web.DownloadString(url);
The above code works fine witout any error, but it doesnt look like it is considereing location parameter.
Is it possible to add any location paramter to the search query fetching Facebook Post?
location parameter can be in form of actual location string (e.g. Los Angeles, CA,US) or GeoCode value ?
Facebook does not support location por "post" search using API
You can't do it for post but you can search a place by location with a geocode:
https://graph.facebook.com/search?q=coffee&type=place¢er=37.76,-122.427&distance=1000&access_token=...