Search code examples
androidinstagraminstagram-api

Instagram Login (Login with Facebook also) integration in android project


I want to integrate Instagram into my app. but, I can't find code which successfully login every time. I followed this document (http://www.theappguruz.com/blog/instagram-integration-android-application-tutorial) It was working before 5 months but not working properly now. When I log in then Progress bar loading for two to three minutes but I don't get any response. If I choose login with facebook then it gives Login failed Error and Sometimes Progress bar loading and don't get any response. Please, suggest me.


Solution

  • I find the solutions, may it help to others,

    Please add following line in your InstagramDialog class

        WebSettings webSettings = mWebView.getSettings();
        webSettings.setDomStorageEnabled(true);
        webSettings.setSavePassword(false);
        webSettings.setSaveFormData(false);
    

    Following line is important,

       webSettings.setDomStorageEnabled(true);
    

    enable this option after that Instagram working fine.

    I would imagine it is disabled by default for space savings and security. Hope this help to many developers. If you have same issue then accept this answeres.