Skip to content

Instantly share code, notes, and snippets.

@Pop-Code
Created September 27, 2012 23:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pop-Code/3797143 to your computer and use it in GitHub Desktop.
Save Pop-Code/3797143 to your computer and use it in GitHub Desktop.
Facebook AWD opengraph Actions shortcodes
<?php
echo do_shortcode('[AWD_facebook_opengraph_actions option="value" otheroption="othervalue"]Content Here[/AWD_facebook_opengraph_actions]');
?>
[AWD_facebook_opengraph_actions option="value" otheroption="othervalue"]Content Here[/AWD_facebook_opengraph_actions]
<?php
//note: this post should have opengraph meta with type "myAppNamespace:apple"
//if post is not set the current post will be used
$post_id = 3;
$action = 'myAppNamespace:eat';
$object = apple;
echo do_shortcode('[AWD_facebook_opengraph_actions html="div" action="'.$action.'" object="'.$object.'" event="click" post_id="'.$post_id.'" ]Eat this Apple![/AWD_facebook_opengraph_actions]');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment