Post status update with location

2020-04-12 03:32发布

问题:

When you post a regular status update to Facebook, it tracks your current location and gives the (near) city next to the time. I.e.: May 24 near New York City, New York. Please note that this is not a check-in.

I'm trying to do the same, without searching for a page (place) id and checkin. I've tried posting the coordinates with latitute and longitute, but it doesn't show the near city.

https://graph.facebook.com/me/feed

message=test
coordinates={"latitude": 37.4163458217, "longitude": -122.15198690595}

回答1:

please check this url https://developers.facebook.com/docs/reference/api/status/

you have to pass the coordinates as an object called place , and that will have the details about the place , few more details about place object ...

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)


回答2:


I realize this is an old question, but just to confirm, posting via an app can only let you tag a place using the place ID.
Please check these related posts -
https://developers.facebook.com/blog/post/2012/03/07/building-better-stories-with-location-and-friends/
https://developers.facebook.com/docs/opengraph/actions/#taggingplaces