Retrieve HERE map location from Facebook event using graph api? - facebook

I'd like to get the latitude & longitude from HERE maps on a Facebook event.
For example this code perfectly works on the https://www.facebook.com/events/1802660966720470/ event:
https://developers.facebook.com/tools/explorer/?method=GET&path=1802660966720470%3Ffields%3Dplace.fields(location)&version=v2.8
But the other https://www.facebook.com/events/664388580412878/ event does not give the coordinates:
https://developers.facebook.com/tools/explorer/?method=GET&path=664388580412878%3Ffields%3Dplace.fields(location)&version=v2.8
Is it possible at all to retrieve these coordinates from FB graph api? Thanks!

Related

How to get location info from Facebook photo object?

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

facebook v2.2 current_location is missing (no fql)

Before version 2.1 i was using fql to get user public information using the following code.
"https://graph.facebook.com/fql?q=select uid,name,current_location from user where uid = xxx"
Then i would parse the country, state and city from the response.
without fql we are using location field which leads to a page and the page gives longitude and latitude.
How do i get the country in v2.2 (The name or country code)
Thanks
You can easily get the location with Graph API using /user
refer to below link.
https://developers.facebook.com/docs/graph-api/reference/v2.2/user
https://developers.facebook.com/tools/explorer/145634995501895/?method=GET&path=me%3Ffields%3Dlocation&version=v2.2&

How to get public posts for particular location using LAT Long

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&center=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

API for Get venues for nearrby Location in foursquare

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

Facebook API: how to post status update with location (latitude + longitude)?

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/