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

Facebook Module Issue

$
0
0

Hey guys i'm not able to use facebook module.

here are the details

Application type: mobile

Titanium SDK: 3.5.0

Platform & version: iOS 8.1, Android x.x

Device: iOS simulator, Android emulator or physical device model

main problem is :-

For the first time i'm able to login through facebook and it redirects back to my application page.

After that i did logout then i'm trying to login but the thing is i'm not able to go further means login even is not working. here is my code..

JS

Alloy.Globals.Facebook = require('facebook');
 
Alloy.Globals.Facebook.appid = 'xxxxxxxxxxxxxxxxxx';
 
Alloy.Globals.Facebook.permissions = ['email', 'public_profile'];
 
 
//well i have a button and this how it goes
 
$.facebook.addEventListener('click', function(e) {
 
        Ti.API.info("inside login auth");
        $.loading.setOpacity(1.0);
        Alloy.Globals.Facebook.authorize();
    });
 
    Alloy.Globals.Facebook.addEventListener('login', function(e) {
        Ti.API.info("inside login");
        $.loading.setOpacity(1.0);
        if (e.success) {
 
            Alloy.Globals.Facebook.requestWithGraphPath('me', {}, 'GET', function(e) {
 
                    Ti.API.info(JSON.stringify(e));
 
                });
            });
        } else {
 
 
        }
 
    });
 
//this is how i logout the facebook
 
Alloy.Globals.Facebook.logout();
Console log....

First time...

it goes to inside login auth then inside login for the second time it goes to login auth but not firing login event.

Hope u understand my problem..


Viewing all articles
Browse latest Browse all 8068

Trending Articles



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