I've added the facebook module (https://github.com/appcelerator-modules/ti.facebook) to my app and followed the instructions on page.
When I invoke Alloy.Globals.Facebook.authorize();
I get an error: Uncaught undefined is not a constant in com.facebook.login.LoginBehavior
Same code is working on iOS. What should I be doing to make this work on Android?
The error is not with the
Alloy.Globals.Facebook.authorize();
statement, you need look for statment likefb.setLoginBehavior(fb.LOGIN_BEHAVIOR_NATIVE);
, Just try and comment the statement and see this would do the trick.Or else just try and set this
LOGIN_BEHAVIOR_DEVICE_AUTH
property in the method.In my opinion you can comment and remove the statement, as this method might not work for android.
Good Luck & Cheers
Ashish Sebastian