Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
stream.publish dialog in an FBML app
$attachment = array( 'name' => 'Name',
'href' => 'http://...'
$action_links = array( array( 'text' => 'Action link text',
'href' => 'http://'
echo '
<script type="text/javascript">
var message = "Just added something to my wishlist!";
var attachment = '.json_encode($attachment).';
var actionlinks = '.json_encode($action_links).';
Facebook.streamPublish(message, attachment, actionlinks);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment