Facebook.authorize works on iPhone, nothing on Android

You must Login before you can answer or comment on any questions.

I'm trying to do do a Titanium.Facebook.authorize(), and it works on iPhone, but I get no reaction on Android.

The login event never get fired. :-/ Nothing gets printed to the log after 'Time to log in'.

Am I missing something?

Titanium.Facebook.appid = MY_APP_ID;
Titanium.Facebook.permissions = ['publish_stream'];
Titanium.Facebook.forceDialogAuth = true; // <--- Tried both
 
if (Titanium.Facebook.loggedIn === true) {
    Ti.API.info('Already logged in!');
} else {
    Titanium.Facebook.addEventListener('login',function(e){
        if (e.success) {
            Ti.API.info('Success!');
        } else if (e.error) {
            Ti.API.info('error: ' + e.error);
        } else {
            Ti.API.info('Unknown error');
        }
    });
 
    Ti.API.info('Time to log in');
    Titanium.Facebook.authorize();
}

— asked 2 years ago by Robin Enhorn
1 Comment
  • I have the same problem on Android. Even the Facebook button that "Just Works" is not working... any ideas?

    — commented 2 years ago by Keith Paton

2 Answers

when i alert() Titanium.Facebook.loggedIn i get a return of 1 and 0 for true and false. Says Boolean value in the doc, but it returns an int. maybe try if (Titanium.Facebook.loggedIn == 0) for false?

Your Answer

Think you can help? Login to answer this question!