Post status update with location

那年仲夏 提交于 2019-12-31 01:50:08

问题


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



来源:https://stackoverflow.com/questions/10871517/post-status-update-with-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!