Action Links

From Facebook Developer Wiki

Revision as of 22:03, 23 October 2009 by Austin Haugen (Talk | contribs)
Jump to: navigation, search

An action link is a short string of text that accompanies a Feed story and invites the user to take some action related to that story. An action link is a hyperlink to a URL on Facebook or your website or another third-party website. Feed stories can contain only one action link with a max of 25 characters.

Placement of the action link depends on the story size and whether or not the story has comments.

Formatting an Action Link

You specify your action link in a JSON-encoded array, like this:

array(array('text' => 'Buy {*song*}', 'href' => 'http://www.onlinemusicsite.com/{*song-path*}') )


When using the JavaScript Client Library (for Facebook Connect and IFrame applications), format the array like this:

var actionLinks = [{ "text": "Watch Video", "href": "http://www.myvideosite/videopage.html"}];


You include this array in the action_links parameter when you call the stream publishing methods:

Action Link Guidelines

Please read and follow the guidelines and policies for action links.

reference