2

It's very sad to say that this question was asked several times and never answered correctly.

This error has been appearing to many people when trying to authorize an app and The only tips people had to say is to Restart phone or delete cache.

Now as this may worked to several people but it's not really an explination nor a serious solution.

There is no explination on this error no where on the web, So i hoped someone can explain about the different error numbers so i can find out where's my problem and to have some sort of a data center on different type of errors, as none explained.

Errors i found in topics so far and mine :

  • Mine : 1358 or 891 seems random
  • 749
  • 417 - this error was explained in a topic to be :

Error- 417 Expectation Failed

The 417 status code means that the server was unable to properly complete the request. One of the headers sent to the server, the "Expect" header, indicated an expectation the server could not meet.

Can someone explain any of those error or any tips in general?

And for my problem, am using the standard code for authorize method as published in the documentation,

Logcat :

    06-10 23:48:11.872: D/Facebook-WebView(1358): Webview loading URL: https://m.facebook.com/dialog/oauth?type=user_agent&redirect_uri=fbconnect%3A%2F%2Fsuccess&display=touch&client_id=MYAPPID
06-10 23:48:11.884: W/webcore(1358): Can't get the viewWidth after the first layout
06-10 23:48:11.899: V/webview(1358): OnSizeChanged: Enter 
06-10 23:48:11.903: D/Facebook-authorize(1358): Login failed: com.facebook.android.DialogError: The connection to the server was unsuccessful
06-10 23:48:11.903: D/Facebook-WebView(1358): Webview loading URL: https://m.facebook.com/dialog/oauth?type=user_agent&redirect_uri=fbconnect%3A%2F%2Fsuccess&display=touch&client_id=MYAPPID
eric.itzhak
  • 15,752
  • 26
  • 89
  • 142

3 Answers3

4

I had the same error.

It seemed that the Facebook app (not the one I was developing) was not working properly, more exactly it was not connecting to the internet.

This is how I resolved it:

  1. I cleared the Facebook app data from Settings->Applications->Manage applications->Facebook->Clear Data;
  2. Opened Facebook app and logged in;
  3. Opened my app and the login dialog appeared.
Igor
  • 33,276
  • 14
  • 79
  • 112
  • This solution worked for me but I'm concerned. Is this going to be a problem that randomly occurs for end users? This fix is fine for development but I don't think it's a good solution to expect users to need to go through. – HotN Nov 01 '12 at 14:03
  • @HotN I faced this problem right now and that solution work. But same goes, how can we catch that error even if we could just Toast it so that the user knows how to handle this situation – Androyds Nov 12 '12 at 08:45
0

Well, the problem was i didn't enable internet connection on the device and didn't notice.

so i guess errors 1358 and 891 meen no connection available.

eric.itzhak
  • 15,752
  • 26
  • 89
  • 142
0

I also faced similar problem while integrating facebook authentication. The problem was my emulator was not connected to internet for some reasons.

Finally I resolved this by using following steps:

In Eclipse:

  1. Right click on the Android project
  2. Go to Run Configurations -> select Target
  3. In the bottom you can find 'Additional Emulator Command line Options'
  4. Enter the command "-dns-server X.X.X.X" (X.X.X.X was the IP address of my DNS server).

Note: My env was Mac OS X 10.8 and eclipse indigo..

Reference: how to connect android emulator to the internet

Thankful to @Jeremy Kie

Community
  • 1
  • 1
Arun G
  • 2,338
  • 1
  • 18
  • 22