我正在開發模式下的Rails應用程序,它可以使用omniauth註冊。Oauth2 Instagram API「重定向URI與註冊重定向URI不匹配」
主機是
http://localhost:3000/
我使用的寶石:
gem 'omniauth'
gem 'omniauth-foursquare'
gem 'omniauth-instagram'
當我通過omniauth註冊Foursquare的出現都沒有問題。所有的設置都是正確的,我在Foursquare開發人員設置中的redirect_uri等於主機(localhost:3000)
但是,如果我在Instagram客戶端管理器*中填寫完全相同的redirect_uri(localhost:3000)。 Instagram的給了我這樣的:
{
"code": 400,
"error_type": "OAuthException",
"error_message": "Redirect URI does not match registered redirect URI"
}
基於此網址:
https://instagram.com/oauth/authorize?response_type=code&client_id=<ID>&redirect_uri=http%3A%2F%2Flocalhost%3A3000%2Fauth%2Finstagram%2Fcallback&state=18415adf24dd97873e61094f67c0fb7a94857fedf93e9d2e&scope=basic
*
我是什麼根據的Instagram,以及如何做錯了這應該是固定的?
我自己修復了這個問題。添加了http:// localhost:3000/auth/instagram/callback作爲redirect_uri,它工作得很好。 – Biketire 2013-05-14 08:17:42
請添加您的評論作爲答案,並將問題標記爲已回答。 – 2013-09-24 10:39:07