Instagram 中的 OAuthException 错误 API
Error in OAuthException in Instagram API
{"code": 400, "error_type": "OAuthException", "error_message": "Redirect URI does not match registered redirect URI"}
我已经有 客户端 ID 和 秘密 ID。我的重定向 url 是 http://localhost。我也在github从macuenca获得了curlhttpclient.php、instagram.php和example.php。我修改了 example.php 并将客户端 ID、密码、ID 和重定向 url 替换为我的。但是每次我 运行 example.php,我都会收到这个错误。
当您注册 Instragram 以获得您的 OAuth client_id 和 client_secret OAuth 时,您注册了 URL 您打算在身份验证后重定向到的。这与您正在使用的 URL (localhost) 不匹配。
您可能需要
(a) 更新您的 Instagram 注册,或
(b) 您正在使用其他人的秘密令牌,因此请注册您自己的
更多信息:
https://instagram.com/developer/authentication/?hl=en
https://instagram.com/developer/register/
您的重定向 URL 必须是绝对的 URL 即类似于
http://localhost/callback.php
然后从此页面本身进行身份验证调用,即 callback.php,否则它不会让您获取访问令牌,也不会传递完整的 URL 在 redirect_url 归档
{"code": 400, "error_type": "OAuthException", "error_message": "Redirect URI does not match registered redirect URI"}
我已经有 客户端 ID 和 秘密 ID。我的重定向 url 是 http://localhost。我也在github从macuenca获得了curlhttpclient.php、instagram.php和example.php。我修改了 example.php 并将客户端 ID、密码、ID 和重定向 url 替换为我的。但是每次我 运行 example.php,我都会收到这个错误。
当您注册 Instragram 以获得您的 OAuth client_id 和 client_secret OAuth 时,您注册了 URL 您打算在身份验证后重定向到的。这与您正在使用的 URL (localhost) 不匹配。
您可能需要
(a) 更新您的 Instagram 注册,或 (b) 您正在使用其他人的秘密令牌,因此请注册您自己的
更多信息: https://instagram.com/developer/authentication/?hl=en https://instagram.com/developer/register/
您的重定向 URL 必须是绝对的 URL 即类似于
http://localhost/callback.php
然后从此页面本身进行身份验证调用,即 callback.php,否则它不会让您获取访问令牌,也不会传递完整的 URL 在 redirect_url 归档