facebbok sdk将交互式地图整合到像Foursquare这样的帖子中 [英] facebbok sdk Integrate interactive map in a post like Foursquare

查看:177
本文介绍了facebbok sdk将交互式地图整合到像Foursquare这样的帖子中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到当我从Foursquare发布到Facebook时,您可以点击地图的静态图像,并在Facebook中打开一个带有交互式地图的窗口。 (btw,bing标志显示在互动地图上)
我该如何实现?



这是帖子:





点击地图后

解决方案

简单Feed



要发布位置,您可以使用 place 参数在故事 - 与 Foursquare 正在使用。这使得故事更美丽,更具互动性。



这里解释了如何使用Open Graph Actions来标记位置。 (在链接中搜索标记地点)。



在您的元标记中,您必须将位置设置为 -

 < meta property =place:location:latitudecontent =37.416382> 
< meta property =place:location:longitudecontent = - 122.152659>






(注意:点击后出现的弹出对话框在图像上默认是Facebook,每当一个地方发布,所以不要担心)



希望它有帮助。祝你好运!


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:

解决方案

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!

这篇关于facebbok sdk将交互式地图整合到像Foursquare这样的帖子中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆