Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Facebook Login: success = 0 , no error, no cancel ?? Why ?

$
0
0

Hi, I've no clue why my application is not being successfully logged in on FB...I've this...

tiapp.xml <ios> <property name="ti.facebook.appid">xxxxx</property> <plist>

index.js

var facebook = Alloy.Globals.Facebook;
facebook.appid = xxxxxxxx;
facebook.permissions = ['public_profile', 'email','user_friends'];
facebook.forceDialogAuth = false;
facebook.logout();
$.fbButton.style = facebook.BUTTON_STYLE_WIDE;
facebook.addEventListener('login', function(e) {
    console.info(e);
    console.info("LoggedIn:" + facebook.loggedIn);
    if (e.success) {
        alert('Logged in');
    }
    else
    {
        //facebook.reauthorize();
    }
});
facebook.addEventListener('logout', function(e) {
    alert('Logged out');
});
index.xml <LoginButton id="fbButton" ns="Alloy.Globals.Facebook"/>

And I got this result...

[INFO] : bubbles = 1; [INFO] : cancelBubble = 0; [INFO] : cancelled = 0; [INFO] : code = "-1"; [INFO] : source = "[object facebook]"; [INFO] : success = 0; [INFO] : type = login; So, the event login fires ok...but success = 0...no errors ?!?! what's wrong ?


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>