Created
July 30, 2011 05:56
-
-
Save micrypt/1115249 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // 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