Hi, everyone I'm using Titanium 2.1.1, windows7, android 4.1. I'm trying the facebook_login_logout.js from kitchen sink and I only change the appId and the permissions. The client has already authorized the app and when i try to login sometimes it works sometimes it doesn't and displays this error:
[ERROR][FacebookModule( 1241)] (Thread-116) [15100,116076] Error validating access token: The session has been invalidated because the user has changed the password. [ERROR][FacebookModule( 1241)] com.facebook.android.FacebookError: Error validating access token: The session has been invalidated because the user has changed the password. [ERROR][FacebookModule( 1241)] at com.facebook.android.Util.parseJson(Util.java:285) [ERROR][FacebookModule( 1241)] at ti.modules.titanium.facebook.FacebookModule$3.onComplete(FacebookModule.java:331) [ERROR][FacebookModule( 1241)] at com.facebook.android.AsyncFacebookRunner$2.run(AsyncFacebookRunner.java:254)That's my code :
var win = Ti.UI.currentWindow; Titanium.Facebook.appid = "41793xxxx815156"; Titanium.Facebook.permissions = ['read_stream','user_birthday','user_location']; // Login Status // var label = Ti.UI.createLabel({ text:'Logged In = ' + Titanium.Facebook.loggedIn, font:{fontSize:14}, height:'auto', top:10, textAlign:'center' }); win.add(label); var forceButton = Ti.UI.createButton({ title:'Force dialog: '+Titanium.Facebook.forceDialogAuth, top:50, width:160, height:40 }); forceButton.addEventListener('click', function() { Titanium.Facebook.forceDialogAuth = !Titanium.Facebook.forceDialogAuth; forceButton.title = "Force dialog: "+Titanium.Facebook.forceDialogAuth; }); win.add(forceButton); function updateLoginStatus() { label.text = 'Logged In = ' + Titanium.Facebook.loggedIn; } // capture Titanium.Facebook.addEventListener('login', updateLoginStatus); Titanium.Facebook.addEventListener('logout', updateLoginStatus); // // Login Button // win.add(Ti.Facebook.createLoginButton({ top : 300, style : Ti.Facebook.BUTTON_STYLE_WIDE }));Thanks for your attention.
1 Answer
first your user must logout from the system, since the problem is this
validating access token: The session has been invalidated because the user has changed the password.your user has change his password and this will make the access token invalid.
Your Answer
Think you can help? Login to answer this question!