Extension:Facebook/Open Graph

This article describes a feature in the Facebook Open Graph extension that is currently under development. If you wish to try this out, check out the opengraph branch on GitHub.

Open Graph social integration
This extension also allows you to define custom Open Graph objects. Custom objects allow your wiki to more deeply integrate into the social graph. For example, let's say the Star Wars wiki registered the "spaceship" object on Facebook and included the tag   on the Millennium Falcon page (http://starwars.wikia.com/wiki/Millennium_Falcon). Now, in the Open Graph, this url represents a spaceship instead of an article.

Custom actions allow your users to interact with objects in creative and meaningful ways. In the example above, let's say the Star Wars wiki defines the "drive" action in the Open Graph Dashboard and connects it to the spaceship and landspeeder objects, and then specifies the relationship in LocalSettings.php:

When this action-object connection is made, the user's private activity log (and maybe their friends' new feeds) will say "User drove the Millennium Falcon," with a link to the wiki page. Assuming you define some Aggregations, a Timeline View for your app will be visible at the top of the user's Timeline. When sufficient connects are made, the user's Timeline will feature a Report showcasing their interactions with your app.

Custom actions
The   tag is used to define custom objects and actions. To set up the extension, you must first define your action-object connections in your Facebook application's Open Graph Dashboard and then register them with the $wgFbOpenGraphCustomActions parameter:

Actions can be placed in your wiki using the   tag:  Drive the ! . This will render a link that, when clicked, adds the activity to the user's Timeline.

Advanced Open Graph integration
The   tag is used for social markup and rendering action buttons. There are five properties inherent to all articles and custom objects: type, title, locale</tt>, image</tt>, and description</tt>. These properties are set automatically, but can be overriden: Custom objects defined in the Open Graph Dashboard can use additional properties, if any have been defined. If the action</tt> attribute is specified, the text inside the tag will be parsed and used as a link for initiating the custom action. An object's definition and an action link can be combined using the same tag. Note that you must first register the action connected to the object and define the relationship using $wgFbOpenGraphCustomActions</tt>. Custom objects can be integrated into most wikis with very little effort. If your wiki uses infoboxes or other categorical templates, include the  </tt> tag in the template. Page: Millennium Falcon

Page: Template:spaceship_infobox

<opengraph type="spaceship" title="" image="" />

Advertising
If your wiki monetizes advertising, action specs can be used in ad targeting to reach out to people based on their actions. For more information see: https://developers.facebook.com/docs/reference/ads-api/action-specs-custom/