Facebook places checkin using open graph protocol ID as place ID

后端 未结 4 1333
小蘑菇
小蘑菇 2021-02-09 20:42

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

相关标签:
4条回答
  • 2021-02-09 21:09

    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">
    
    0 讨论(0)
  • 2021-02-09 21:09

    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.

    0 讨论(0)
  • 2021-02-09 21:21

    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.

    0 讨论(0)
  • 2021-02-09 21:22

    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.

    0 讨论(0)
提交回复
热议问题