WASD42
WASD42

Reputation: 2379

How to correctly setup the Facebook OpenGraph API story with map attachment?

I'm trying to setup a custom Story for my website/Facebook app to provide my users the "I've been here" and "I want to visit this place" functionality according to this documentation: https://developers.facebook.com/docs/opengraph/creating-custom-stories/

Everything is working great except that the "stories" from my app appears on Timeline as the normal Item layout with photo and description when I want to show this item on the map.

Example URL with OG data: 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"/>

As you can see I do provide the location coordinates too.

The Story was created using a custom Action called "Want to visit" with a custom property Attraction which is inherited from Place object. The attachment's layout of this story is set to Map with "Highlighted Points" property set to "attraction.place:location".

Here is how the Attachment looks like: http://dl.dropbox.com/u/16514036/Screenshots/bkpm.png

What am I doing wrong? :)

PS: this action is currently set to Development mode and cannot be tested externally.

Upvotes: 3

Views: 1672

Answers (1)

WASD42
WASD42

Reputation: 2379

It seems that for some reason the default "place:location:attribute" for the Object extended from Place object wouldn't work. You should add your own GeoPoint attribute to the Object and set it on the page:

<meta property="your_namespace:location_attribute:latitude" content="36.25500"/>
<meta property="your_namespace:location_attribute:longitude" content="-112.69770"/>

In this case the Action will be posted as Map correctly.

Upvotes: 1

Related Questions