1
votes

I want to add facebook login button to my appcelerator titanium mobile app. After following this doc : Titanium facebook module

I am able to display facebook login button :

var fb = require('facebook');
fb.addEventListener('login', function(e) {
    if (e.success) {
        alert('login from uid: '+e.uid+', name: '+ JSON.parse(e.data).name);
        label.text = 'Logged In = ' + fb.loggedIn;
    }
    else if (e.cancelled) {
        // user cancelled
        alert('cancelled');
    }
    else {
        alert(e.error);
    }
});

fb.addEventListener('logout', function(e) {
    alert('Logged out');
});

fb.authorize();
$.win.open();

for the view :

<Alloy>
	<Window id="win" class="container">
		<View id="fblogin" class="fblogin">
			<LoginButton id="fbLogin" module="facebook" />
		</View>
	</Window>
</Alloy>

But when i click on the facebook login button, it open a second window the following message : Not Logged In: You are not logged in. Please login and try again.

No login dialog is shown just this message and user cannot login either.

I just want to open login dialog and when success return to app with user infos.

Note : I also get notice from facebook as given url is not allowed by the application configuration.

Thanks for your help.

1

1 Answers

0
votes

Select a module vesion prior 5 (in my case 4.0.5) that solved the problem to me

greetings