Created
October 7, 2012 04:00
-
-
Save ntotten/3847055 to your computer and use it in GitHub Desktop.
Facebook jQuery Helper
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
| $(document).ready(function() { | |
| // Add the function to run after FB is initialized | |
| $(document).on('fb:initialized', function() { | |
| FB.getLoginStatus(fbAuthStatusChange); | |
| }); | |
| $(document).fb('youappid'); | |
| }); | |
| function fbAuthStatusChange(request) { | |
| // Do something | |
| } |
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
| $(document).on('fb:initializing', function() { | |
| // Do something before FB.Init is called | |
| }); | |
| $(document).on('fb:initialized', function() { | |
| // Do something after FB.Init is called | |
| }); | |
| $(document).fb('youappid'); |
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
| $(document).fb('youappid'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment