我正在尝试为我的网站/Facebook 应用程序设置自定义故事,以便根据此文档向我的用户提供“我来过这里”和“我想参观这个地方”的功能:https://developers.facebook.com/docs/opengraph/creating-custom-stories/
除了当我想在 map 上显示这个项目时,我的应用程序中的“故事”作为带有照片和描述的正常项目布局出现在时间轴上之外,一切都很好。
包含 OG 数据的示例 URL:http://en.advisor.travel/poi/16828 :
<meta property="place:location:latitude" content="36.25500"/>
<meta property="place:location:longitude" content="-112.69770"/>
<meta property="og:image" content="http://img1.advisor.travel/657x340px-bd308129ce37a06485dfe9ac47bee982.jpg"/>
<meta property="og:title" content="Havasu Falls"/>
<meta property="og:url" content="http://en.advisor.travel/poi/16828"/>
<meta property="og:type" content="worldpoi:attraction"/>
如您所见,我也提供了位置坐标。
故事是使用名为“想要访问”的自定义操作创建的,该操作具有从 Place 对象继承的自定义属性 Attraction。此故事的附件布局设置为 map ,其中“突出显示的点”属性设置为“attraction.place:location”。
附件如下所示:http://dl.dropbox.com/u/16514036/Screenshots/bkpm.png
我做错了什么? :)
PS:该 Action 目前设置为开发模式,无法进行外部测试。
最佳答案
似乎出于某种原因,从 Place 对象扩展的对象的默认“place:location:attribute”不起作用。您应该将自己的 GeoPoint 属性添加到对象并在页面上设置它:
<meta property="your_namespace:location_attribute:latitude" content="36.25500"/>
<meta property="your_namespace:location_attribute:longitude" content="-112.69770"/>
在这种情况下,Action 将正确发布为 Map。
关于facebook - 如何正确设置带有 map 附件的 Facebook OpenGraph API 故事?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15743503/