Skip to content

Instantly share code, notes, and snippets.

@micrypt
Created July 30, 2011 05:56
Show Gist options
  • Select an option

  • Save micrypt/1115249 to your computer and use it in GitHub Desktop.

Select an option

Save micrypt/1115249 to your computer and use it in GitHub Desktop.
// fb_init.php
require_once('facebook.php');
$facebook = new Facebook(array(
'appId'=>'1234567', // replace with your value
'secret'=>'123abc456def' // replace with your value
));
// reveal.php
include_once('fb_init.php');
$signedRequest = $facebook->getSignedRequest();
// Inspect the signed request
if($signedRequest['page']['liked'] == 1){
// Show the content for the person who liked the page
print 'Revealed content';
} else {
// Show the reveal ask content
print 'Like this page!';
}
http://www.facebook.com/pages/Podcast/170190799718982?ref=hnav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment