Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <body>
- <div id="fb-root"></div>
- <script>
- window.fbAsyncInit = function() {
- FB.init({appId: '[my-appid]', status: true, cookie: true, xfbml: true});
- //Check if user is logged-in to facebook:
- FB.getLoginStatus(function(response) {
- if (response.session) {
- // Here I use some FB.api functions
- // and get some data I need about the user's facebook profile,
- // and make same changes to the document html accordingly...
- }
- });
- };
- (function() {
- var e = document.createElement('script');
- e.src = document.location.protocol + '//connect.facebook.net/en_US/all.js';
- e.async = true;
- document.getElementById('fb-root').appendChild(e);
- }());
- </script>
- FB.XFBML.parse(document.getElementById('idOfElement'));
Add Comment
Please, Sign In to add comment