如何获取发布内容(Instagram Graph API)客户端的访问令牌?

发布于 2025-01-15 22:45:08 字数 682 浏览 4 评论 0原文

我知道我可以使用此端点来获取访问令牌,以便能够将内容发布到 Instagram 企业帐户:

https://graph.facebook.com/{graph-api-version}/oauth/access_token?grant_type=fb_exchange_token&client_id={app-id}&client_secret={app-secret}&fb_exchange_token={your-access-token}

但此方法只是服务器端,因为您需要提供 client_secret。

我希望为 Django 项目实现此功能,因此我需要用户在客户端授权我的 Facebbok 应用程序将内容发布到他们的 Instagram。

我为 Instagram 基本显示找到了这个:

https://api.instagram.com/oauth/authorize?client_id={instagram-app-id}&redirect_uri={redirect-uri}&scope={scope}&response_type=code&state={state}   

Can this be used for the Instgram Graph API?你有这方面的例子吗?因为我没能让它发挥作用。

I know I can use this endpoint to get an access token to be able to publish content to a instagram business account:

https://graph.facebook.com/{graph-api-version}/oauth/access_token?grant_type=fb_exchange_token&client_id={app-id}&client_secret={app-secret}&fb_exchange_token={your-access-token}

But this method is only server side as you'll need to provide your client_secret.

I'm looking to implement this for a Django project so I need the user to authorize on the client side my facebbok app to publish content to their instagram.

I found this for the Instagram Basic Display:

https://api.instagram.com/oauth/authorize?client_id={instagram-app-id}&redirect_uri={redirect-uri}&scope={scope}&response_type=code&state={state}   

Can this be used for the Instgram Graph API? Do you have an example of this? Because I haven't been able to make it work.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文