简体   繁体   中英

Android Instagram API net:ERR_CONNECTION_REFUSED

I am attempting to integrate the Instagram API into my app. I am using the code in this library as I have seen others do with success. I am able to sign into Instagram and make it to the authorization page. When I click on authorize, I end up getting the error toast from the listener which gives me the error "net:ERR_CONNECTION_REFUSED". I have been stuck on this for hours and have not found a solid answer to this issue. I'm hoping someone can help me get around this as I feel I am very close to getting this to work. Thanks.

One of the things that can cause this problem is that the redirect_url needs to point to an instagram:// url instead of a http:// or https:// one. Using

instagram://connect

seems to make the ERR_CONNECTION_REFUSED go away.

This is a long shot but, have you added network access permissions to the application?

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

If not, the OS could be blocking the API from continuing after the browser calls back.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM