javascript - Facebook Login callback not working in titanium -


i trying implement facebook login in titanium app. login working callback method not calling when user login or logout.

i have added module. added key in tiapp.xml

then have coded in .js file

var fb = require('facebook'); fb.appid = 11111111111111; fb.permissions = ['public_profile','email']; fb.forcedialogauth = true;   var fblogin = fb.createloginbutton({     top : '25%',     style : fb.button_style_wide,     zindex : 10 });   fb.addeventlistener('login', function(e) {       if (e.success) {          alert('logged in');       } else if (e.error) {          alert(e.error);      } else if (e.cancelled) {          alert("canceled");      }      console.log("outside "); });  fb.addeventlistener('logout', function(e) {     alert('logged out'); }); win.add(fblogin); 

try calling fb.initialize() @ end of file.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -