9

I am working on an app that uses Facebook as an alternate login method to the app's standard account creation flow. On some devices, the web dialog authentication for Facebook is producing the error "Cookies are not enabled on your browser. Please adjust this in your security preferences".

So far I've seen it only on the a small Amazon Kindle Fire and a Galaxy Tab 10.1. I have verified that cookies are enabled on both devices, and the devices are able to log into Facebook using their stock web browsers. Reinstalling my app on the devices has had no effect, and no errors or warnings are present in logcat when the web dialog is launched. I'm using the lastest Facebook SDK 3.0 for Android.

Any insights on this issue would be appreciated.

EDIT: I should also add that I'm not sure if there is actually a problem with cookies. If I enter a bogus password, the FB dialog will attempt a login and fail with a password error message. If I then attempt to login again, using a real password, the dialog will pass and everything will process smoothly. A FB session is created correctly as well. The Cookie error only appears if I try a "real" login first, as opposed to failing the first login and then logging in a second time.

TaylorP
  • 1,039
  • 2
  • 13
  • 28
  • The setting in the stock browser probably is not affecting your login dialog. You need the WebView that contains the login to accept cookies I would imagine. – FoamyGuy Feb 05 '13 at 16:59
  • The creation of the WebView isn't in my own code, but in the Facebook Android SDK. I did review some other material on correctly instantiating web views, cookie problems with them, etc and the Facebook SDK code doesn't seem to do anything that would cause the issue. – TaylorP Feb 05 '13 at 17:07
  • Did you find an answer for why this was happening? @TaylorP – Asutosh Panda May 19 '22 at 11:37

1 Answers1

1

I have faced the same issue & What i have done to solve this_

  1. launch My device default Browser
  2. go to option menu,
  3. select more then settings
  4. Scroll down until you find the Accept cookies option. The box next to it should not be checked. Selecting on the box will put a green check mark and enable cookies for the web browser. If you want to disable cookies, just toggle off the check box(test in both cases when cookies enabled & when disabled).

I hope this will solve your problem.

Rupesh Yadav
  • 12,096
  • 4
  • 53
  • 70
  • Thanks for the answer, but I've already tried that. Cookies are enabled correctly on the devices experiencing the issue. – TaylorP Feb 13 '13 at 14:26
  • if you already checked that checkbox one you cleared the cookies data your app will not show this message – Krutik Feb 13 '13 at 15:11
  • The app is showing the message even though cookies has been toggled. As said in my post, I've tried clearing cookies, toggling, rebooting the devices, etc. There are no other browsers installed except for the default. Furthermore, the error does not occur when logging in to Facebook via the browser - it only happens when using Facebook's web dialog pop up in the Android Facebook SDK 3.0. – TaylorP Feb 14 '13 at 14:59
  • Maybe check for third party cookies option? – Aaron S Jul 08 '15 at 22:38