Instragram Embed 无法在 React 应用程序上运行

发布于 2025-01-15 04:11:11 字数 1169 浏览 3 评论 0原文

考虑到 Web Pack 造成的错误,我已经在这方面取得了很大进展,但我遇到了障碍。这是我的代码。我已经 XXX 删除了秘密和令牌,但我从我通过开发者控制台创建的 Facebook 应用程序中检索了它们。

  function InstagramFeed() {

  const APP_ID = 639657380440168;
  const APP_SECRET = "xxxx"
  const CLIENT_TOKEN = "xxx"

  return (
    <div>
      <InstagramEmbed
        url='https://instagram.com/myprofile'
        clientAccessToken={APP_ID | CLIENT_TOKEN}
        maxWidth={320}
        hideCaption={false}
        containerTagName='div'
        protocol=''
        injectScript
        onLoading={() => { }}
        onSuccess={() => { }}
        onAfterRender={() => { }}
        onFailure={() => { }}
      />

    </div>
  )
export default InstagramFeed

我收到的错误是 401 https://graph.facebook.com/v11.0/instagram_oembed/?url=https%3A%2F%2Finstagram.com%2Fshanstasticeric&hidecaption=false&omitscript=true&fields=html&maxwidth=320< /a>

任何帮助将不胜感激。谢谢

I got pretty far with this considering the errors that Web Pack was causing but I hit a snag. Here's my code. I've XXX-ed out the secret, and token but I retrieved them from my facebook app that i created via the developer console.

  function InstagramFeed() {

  const APP_ID = 639657380440168;
  const APP_SECRET = "xxxx"
  const CLIENT_TOKEN = "xxx"

  return (
    <div>
      <InstagramEmbed
        url='https://instagram.com/myprofile'
        clientAccessToken={APP_ID | CLIENT_TOKEN}
        maxWidth={320}
        hideCaption={false}
        containerTagName='div'
        protocol=''
        injectScript
        onLoading={() => { }}
        onSuccess={() => { }}
        onAfterRender={() => { }}
        onFailure={() => { }}
      />

    </div>
  )
export default InstagramFeed

The error I am getting is a 401 https://graph.facebook.com/v11.0/instagram_oembed/?url=https%3A%2F%2Finstagram.com%2Fshanstasticeric&hidecaption=false&omitscript=true&fields=html&maxwidth=320

Any help would be greatly appreciated. Thanks

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

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

发布评论

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