facebook-android-sdk icon indicating copy to clipboard operation
facebook-android-sdk copied to clipboard

Disable Form Data Saving For Facebook Session Login DIalog

Open echirchir opened this issue 12 years ago • 5 comments

My app requires users to login with Facebook and I use Facebook SDK 3.6 version which uses Session.getActiveSession(activity, true, callback); to load a login dialog. The problem is that once the user has completed his/her task, even though I close and clear session information, if the user comes back, his/her email will be remembered by the login form.

This is not very good for the kind of app I am working on because it will be used by multiple users at the same location in the same device (tablet). So, how can I disable form data saving (Login dialog should not remember my email EVER). I do not want to edit the Facebook SDK code.

The login process in my app uses a webview because I do not want to install a Facebook App (Intentional). Thanks

echirchir avatar Mar 07 '14 17:03 echirchir

Thanks for letting us know. As a temporary fix, you can alter the Facebook SDK yourself by adding webView.getSettings().setSaveFormData(false) to line 349 of the com.facebook.widget.WebDialog class.

mingflifb avatar Mar 10 '14 18:03 mingflifb

I ended up doing just that! Thank you for responding!

echirchir avatar Mar 10 '14 18:03 echirchir

Hello

mimobuddy704 avatar Apr 07 '14 07:04 mimobuddy704

On Facebook Android SDK v3.8, webView.getSettings().setSaveFormData(false) is setted as default. SDK gets NullPointerException for session when publishing process on WebDialog/WebView. I remove webView.getSettings().setSaveFormData(false) from com.facebook.widget.WebDialog class. Finally, i published my post with session callback.

ismailakkulak avatar Apr 18 '14 17:04 ismailakkulak

This has been updated in the latest versions of the SDK.

mingflifb avatar Jun 11 '14 17:06 mingflifb