android-instagram-oauth icon indicating copy to clipboard operation
android-instagram-oauth copied to clipboard

fetchUserName() and java.io.FileNotFoundException

Open slavkoder opened this issue 12 years ago • 3 comments

Hello,

I'm trying to use the library and I found a bug in fetchUserName() method - it fails with FileNotFoundException. However, it's easy to fix, just remove the line urlConnection.setDoOutput(true); from the method, because it forces POST request instead of GET.

Thank you for great job, the lib is of great help for me.

Best regards, Slava Panasenko

slavkoder avatar Nov 08 '12 11:11 slavkoder

Thanks! you can actually submit a pull request and I will approve it with the code change.

thiagolocatelli avatar Mar 05 '13 02:03 thiagolocatelli

Not working in my case. Still getting

W/System.err: java.io.FileNotFoundException: [(https://api.instagram.com/oauth/access_token)]
W/System.err:     at com.android.okhttp.internal.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:207)
W/System.err:     at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
W/System.err:     at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
W/System.err:     at shared.InstagramApp$3.run(InstagramApp.java:145)

W/System.err: at shared.InstagramApp$3.run(InstagramApp.java:145) :: String response = Util.streamToString(urlConnection .getInputStream());

Testuser36 avatar Oct 25 '17 07:10 Testuser36

Any Solution?

pratikbutani avatar Nov 01 '17 07:11 pratikbutani