如何使用隐式流程生成 Instagram 访问令牌?
How Can I Generate an Instagram Access Token Using their Implicit Flow?
我想使用 Instagram API 在我自己的网站上展示我自己的内容。我可以在他们的文档中看到,当应用程序处于沙盒模式时,内容所有者可以在他们的网站上显示最多 20 个媒体。
我已经在我的帐户上创建了一个应用程序,我正在尝试使用他们的 Client Side Implicit Authentication 生成一个 access_token
。
我点击这个 URL 并登录到我的帐户:
https://www.instagram.com/oauth/authorize/?client_id=MYCLIENTID&redirect_uri=www.mysite.com&response_type=token
当我提交登录表单时,我被带到一个 Instagram 404 页面,上面写着:
Sorry, this page isn't available. The link you followed may be broken, or the page may have been removed. Go back to Instagram.
我错过了什么?我什至需要 access_token 吗?在去年 11 月他们更改 API 之前,我只能在请求中使用 client_id
。我想这不可能了?
我认为您需要为 redirect_uri
添加 http://.../
。所以它会是:https://www.instagram.com/oauth/authorize/?client_id=MYCLIENTID&redirect_uri=http://www.example.com/&response_type=token
但这当然意味着您还需要在 Instagram 的 "Manage Clients" 中添加 http://www.example.com/
作为有效重定向 URI。
我想使用 Instagram API 在我自己的网站上展示我自己的内容。我可以在他们的文档中看到,当应用程序处于沙盒模式时,内容所有者可以在他们的网站上显示最多 20 个媒体。
我已经在我的帐户上创建了一个应用程序,我正在尝试使用他们的 Client Side Implicit Authentication 生成一个 access_token
。
我点击这个 URL 并登录到我的帐户:
https://www.instagram.com/oauth/authorize/?client_id=MYCLIENTID&redirect_uri=www.mysite.com&response_type=token
当我提交登录表单时,我被带到一个 Instagram 404 页面,上面写着:
Sorry, this page isn't available. The link you followed may be broken, or the page may have been removed. Go back to Instagram.
我错过了什么?我什至需要 access_token 吗?在去年 11 月他们更改 API 之前,我只能在请求中使用 client_id
。我想这不可能了?
我认为您需要为 redirect_uri
添加 http://.../
。所以它会是:https://www.instagram.com/oauth/authorize/?client_id=MYCLIENTID&redirect_uri=http://www.example.com/&response_type=token
但这当然意味着您还需要在 Instagram 的 "Manage Clients" 中添加 http://www.example.com/
作为有效重定向 URI。