How to add facebook authentication to login page when using instagram API to authenticate users?

Edward Mehr picture Edward Mehr · Feb 13, 2015 · Viewed 7.1k times · Source

I use instagram api in my app. Per documentation I redirect users to api.instagram.com/oauth/authorize to let the user login with their instagram account. The page the user sees is :

enter image description here

This works fine but many instagram users use Facebook to login to their instagram. How can I allow users to sign in to instagram using facebook for authenticating users in my app? That sounded very convoluted when I read it :)

I basically want users to see following:

enter image description here

update: This only happens when loading auth screen in UIWebView inside my ios app.

I also noticed that the UI Web View has JS errors: "The "fb-root" div has not been created, auto-creating", source: https://connect.facebook.net/en_US/sdk.js

I believe this is the cause but not sure how to fix it. Sounds like an instagram bug.

Answer

You actually don't need that, if you are registered on instagram with facebook. When you put your username and password on the textfields the same website will ask you for facebook authorization.

Hope I could help you.