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

Facebook Login doesn't work on android

$
0
0

Application type: mobile Titanium SDK: 3.5.1 Platform & version: iOS 8.4 Android 4.1.2, Device: iOS simulator, Hisense U970 Host Operating System: OSX Yosemite 10.10.3

i'm trying to insert facebook login on app. On iOS it works but on Android, the facebook login button doesn't appear and it doesn't work

my code is it

var fb = require('facebook');
fb.appid = '**************';
fb.permissions = ['publish_stream'];
fb.forceDialogAuth = true;
 fb.authorize();
fb.addEventListener('login', function(e){
    Ti.API.info("i'm here");
 if (e.success) {
        fb.requestWithGraphPath('me', {}, 'GET', function(e) {
    if (e.success) {
        alert(e.result);
    } else if (e.error) {
        alert(e.error);
    } else {
        alert('Unknown response');
    }
});
    }
    else if (e.cancelled) {
        // user cancelled
        alert('cancelled');
    }
    else {
        alert(e.error);
    }
});
fb.addEventListener('logout', function(e) {
    alert('Logged out');
});
it doesn't show me info on logs! how i can fix it?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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