Including sample app code below. Steps to reproduce:
- Create a Facebook app at developers.facebook.com. I used the app default settings, just make sure "Native iOS App" is clicked, match the Bundle ID to what is in tiapp.xml, and that Facebook login is enabled for the app. I also turned off sandbox mode on Facebook.
- Use the code included below, make sure to change your FB app ID. Log in and out - all works fine. Do this on the device, not simulator.
- In your browser, go to https://www.facebook.com/settings and change your password. Select the option to logout of devices, as the user is likely to do.
- Go to your Ti app on the phone, logout and try to login again - will fail as expected.
- in iOS, go to Settings -> Facebook -> Your Name, and update your password to match the one you entered in the browser a bit earlier.
- Go into Facebook app on phone, which will ask you to log in again due to the expired session, caused by the password change.
- Now go to the Ti app, try to log in - STILL FAILS!!!! Definitely not the expected behavior, and not sure how to instruct the user.
- The only way I successfully got out of this conundrum was to toggle the Ti app's Facebook permission under "Allow These Apps to Use Your Account" at iOS Settings -> Facebook, but even this is unreliable.
- What makes this even worse, is that I have seen cases where Facebook claims the user changed the password (seen this by using the token debug tool) - when the user (me!) has not changed his password.
Code to reproduce:
bits from tiapp.xml