Facebook places checkin using open graph protocol ID as place ID

北慕城南 提交于 2019-12-03 07:42:53

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.

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.

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">
maliayas

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.

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