Facebook places checkin using open graph protocol ID as place ID

半世苍凉 提交于 2019-12-04 12:01:21

问题


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!


回答1:


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:

  <meta property="mytestapp:location:latitude" content="37.791" />
  <meta property="mytestapp:location:longitude" content="-122.395" />

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.




回答2:


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.

http://graph.facebook.com/149998791679075

http://foursquare.com/venue/128530

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.




回答3:


The Geopoint object is described here:

https://developers.dev.facebook.com/docs/opengraph/complextypes/#geopoint

Example:

<meta property="your-og-app:location:latitude"  content="37.416382"> 
<meta property="your-og-app:location:longitude" content="-122.152659"> 
<meta property="your-og-app:location:altitude"  content="42">



回答4:


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.



来源:https://stackoverflow.com/questions/5526351/facebook-places-checkin-using-open-graph-protocol-id-as-place-id

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