【发布时间】:2015-09-29 14:36:17
【问题描述】:
我正在使用 Instagram Api。 为了检索访问令牌,我使用带有参数“code”的方法。 通过这个代码参数,我可以构建一个返回访问令牌的 url。
例子:
https://instagram.com/oauth/authorize/?client_id=CODE_ID&redirect_uri=my-redirect-url&response_type=code
当我通过网络浏览器访问此 URL 时,在 Instagram 重定向后,它返回到我创建的网络服务。然后,我的访问令牌被存储。
如何在 PHP 中实现自动化?
这个例子不起作用:
exec('curl https://instagram.com/oauth/authorize/?client_id=CODE_ID&redirect_uri=my-redirect-url&response_type=code');
如何处理 Instagram 的重定向?
提前致谢。
【问题讨论】:
标签: php http instagram access-token instagram-api