Android - Instagram basic display API authorization URL not loading in Android 6 Marshmallow
1

I am trying to login using instagram basic display api. Authorization URL is loading properly in Android 7 (Nougat) or Higher but URL is not loading in Android 6 (Marshmallow). When I submit my app for review, Instagram rejects my app by saying "Please ensure that the APK provided is working correctly when run on Android 6.0 (Marshmallow) or higher, as this is the version of Android our team uses when reviewing your submission".

On Android 6, Webview shows the error "Something went wrong, There's an issue and the page could not be loaded".

this is how i call to open the web view.

val authorizationUrl = "https://api.instagram.com/oauth/authorize" +
        "?client_id=$clientId" +
        "&redirect_uri=$redirectUri" +
        "&scope=$scope" +
        "&response_type=code"

val intent = Intent(Intent.ACTION_VIEW, Uri.parse(authorizationUrl))
startActivity(intent)

I tried to open the link in app webview and set javascriptenabled and domstorageenable but nothing works for me and same error appears.

On android 6 i tried to open instagram.com in default browser but it still returns the same error.

Join
Asked about a month ago