facebbok sdk Integrate interactive map in a post like Foursquare

泪湿孤枕 提交于 2019-12-02 09:22:05

问题


I saw that when I publish to Facebook from Foursquare then you can click on the static image of the map and opens a window in Facebook with interactive map. (btw, bing logo showing on the interactive map) how can i achieve that?

this is the post:

this is after clicking the map:


回答1:


Simple Feed

To publish a location you can use the place parameter in the /user-id/feed API. The place parameter be the page-id of that place.

For eg: If I want to publish a location: Gurgaon-

\POST /me/feed
place: 106487939387579

and the post will look like:

Earlier you were also able to use this with the coordinates parameter that include longitude and latitude but this is now deprecated. For this you have to use the Open Graph Story- the same that Foursquare is using. That makes the story beautiful and more interactive. "{user} checked in {action} at {place} on {AppName}"

Open Graph Story

Here is explained how to tag places using the Open Graph Actions. (search for Tagging places in the link).

In you meta tags you have to set the location as-

<meta property="place:location:latitude"  content="37.416382"> 
<meta property="place:location:longitude" content="-122.152659">

(Note: The popup dialog that appears after clicking on the image is default be facebook, whenever a place is published. So don't worry about that)

Hope it helps. Good luck!



来源:https://stackoverflow.com/questions/22706323/facebbok-sdk-integrate-interactive-map-in-a-post-like-foursquare

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