Facebook 使用开放图协议 ID 作为地点 ID 进行签到
我使用 FB 页面 linter 来验证我使用的所有元信息都是正确的。根据 graph url,我的页面 id 是 157797447612809,但是当我尝试向此页面发布签到时,我收到错误:
(#100) Requires a valid Place Page ID
令人惊讶的是,没有关于发布签到的良好信息签入互联网上任何地方都可以使用的开放图表页面。我已经使用了我能想象到的地点页面 ID 的所有可能变体,从 URL 到不同页面的页面 ID,但我总是遇到同样的错误。有人有关于如何实现这一点的示例吗?谢谢!
I used the FB page linter to verify that all the meta information I'm using is correct. According to the graph url, my page id is 157797447612809, yet when I try to publish a checkin to this page, i receive the error:
(#100) Requires a valid Place Page ID
Surprisingly, there is no good information about publishing a checkin to an open graph page available anywhere on the internet. I've used every possible variation of my place page ID that I could imagine, from the URL to page id's of different pages, yet I always get this same error. Does anyone have an example on how this should be accomplished? Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
由于 Facebook 绝对没有关于此事的文档,因此我通过查看 foursquare 所做的事情以及大量的试验和错误来解决了这个问题。
在 facebook 中定义开放图对象时,您必须添加 GeoPoint 类型的属性。我给我所在的位置打了电话。在对象页面元中定义如下:
现在,当您调试/lint 该对象时,它会注册为一个位置,就像 foursquare 总部。您可以签入并创建包含此对象的操作的地图视图。
Since there is absolutely no documentation by Facebook on this matter, I solved this by looking at what foursquare has done and a lot of trial and error.
When defining your open graph object within facebook, you must add a property of type GeoPoint. I called mine location. Define in the object page meta like this:
Now when you debug/lint this object it register as a place, just like the foursquare HQ. You can check in and create map views for actions that include this object.
我认为您至少需要添加与位置相关的标签,例如 og:longitude & 。 og:纬度。
请参阅此图形输出,了解具有这些 og 标签和签入的页面。
顺便说一句:我希望你明白这个例子的讽刺意义 8)
我也不确定你是否可以签到og:type=food 页面。它可能必须是地点类型之一,例如地标 - 请参阅 OpenGraph 页面上的类型信息。但是上面的示例适用于 og:type=company,因此您需要测试不同的类型才能看到。
I think you'd need to add at least the location related tags e.g. og:longitude & og:latitude.
See this graph output for a page that has these og tags and checkins.
BTW: I hope you get the irony of this example 8)
I'm also not sure if you can checkin to a og:type=food page. It may have to be one of the places types e.g. landmark - see types info on the OpenGraph page. However the example above is for og:type=company so you'd need to test the different types to see.
Geopoint 对象的描述如下:
https://developers.dev.facebook.com /docs/opengraph/complextypes/#geopoint
示例:
The Geopoint object is described here:
https://developers.dev.facebook.com/docs/opengraph/complextypes/#geopoint
Example:
我在这上面花了太多时间,但这似乎不可能。然后我遇到了 这个 回答。我想这个功能目前只对Foursquare开放。 Facebook API 文档没有与此相关的任何内容。
I have spent too many hours on this but it doesn't seem possible. Then I came accross with this answer. I think this feature is currently open only to Foursquare. Facebook API docs doesn't have anything related to this.