Events do not fire in javascript facebook sdk -


here complete snippet of code using. have read through documentation , still not able figure out this. running code locally on visual studio 2010 , chrome browser. have set site url, canvas url , secure canvas url localhost. have app domain empty. guessing doing wrong , cannot figure out. please me

<html>   <body>     <div id="fb-root"></div>        <script>           window.fbasyncinit = function() {           fb.init({             appid      : '129307260602861',             status     : true,              cookie     : true,             xfbml      : true,             oauth      : true,           });       fb.event.subscribe('auth.login', function(response) {        fblogin(); //first login time     });      fb.event.subscribe('auth.authresponsechange', function(response) {   alert('the status of session is: ' + response.status);});      fb.event.subscribe('auth.logout', function(response) {         alert('logout');     });       };  (function() {     var e = document.createelement('script');     e.type = 'text/javascript';     e.src = document.location.protocol +                 '//connect.facebook.net/en_us/all.js';     e.async = true;     document.getelementbyid('fb-root').appendchild(e); } ());      function fblogin() {      fb.getloginstatus(function(response) {          if (response.status === 'connected') {             //check extened permisions             var access_token =  response.authresponse.accesstoken;             var user_id = response.authresponse.userid;        // business         alert('here');         }         else {             //user not logged in             alert('here');         }     });  }     </script>     <fb:login-button autologoutlink='true' perms='email,user_birthday,status_update,publish_stream'></fb:login-button>  </body>   </html> 


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -