Stream.publish 问题,共享不起作用

发布于 2024-12-07 16:14:52 字数 1316 浏览 3 评论 0原文

两天前,我开始开发一个新的应用程序,我只是复制并粘贴我的另一个应用程序,然后按照我想要的方式更改它。

**问题是我的旧应用程序与共享功能完美配合,但新应用程序出现错误:

发生错误。请稍后重试。

我没有忘记在FB.init中更改APP_ID。

我的分享功能:

<script type="text/javascript">
    function fb_share()
    {
        var publish = {
          method: 'stream.publish',
          message: 'Apie tai, kuo gyvena kauniečiai :)',
          attachment: {
            name: 'Kas vyksta Kaune tiesioginės transliacijos',
            caption: '',
            description: (
              'Kas vyksta Kaune vaizdas gyvai visiems kauniečiams!'
            ),
        media: [
              {
                type: 'image',
                href: 'http://www.facebook.com/Kaunas.gyvai?sk=app_292352984114290',
                src: 'http://misterp.lt/apps/share/Bambuser_app_icon.jpg'
              }
            ]
         ,href: 'http://www.facebook.com/Kaunas.gyvai?sk=app_292352984114290'
          },
          action_links: [
            { text: 'Tinklapis', href: 'http://www.facebook.com/Kaunas.gyvai?sk=app_292352984114290' }
          ],
          user_message_prompt: 'Kas vyksta Kaune tiesioginės transliacijos'
        };
         FB.ui(publish, function(response) { console.log(response); });
    }
</script>

Two days ago I started to develop a new application, and I am just copied and pasted my other application, and then change it like how I want.

**The problem is that my old application worked perfectly with the share function, but the new one gives an error:

An error occurred. Please try again later.

I didn't forget to change APP_ID in FB.init.

My share function:

<script type="text/javascript">
    function fb_share()
    {
        var publish = {
          method: 'stream.publish',
          message: 'Apie tai, kuo gyvena kauniečiai :)',
          attachment: {
            name: 'Kas vyksta Kaune tiesioginės transliacijos',
            caption: '',
            description: (
              'Kas vyksta Kaune vaizdas gyvai visiems kauniečiams!'
            ),
        media: [
              {
                type: 'image',
                href: 'http://www.facebook.com/Kaunas.gyvai?sk=app_292352984114290',
                src: 'http://misterp.lt/apps/share/Bambuser_app_icon.jpg'
              }
            ]
         ,href: 'http://www.facebook.com/Kaunas.gyvai?sk=app_292352984114290'
          },
          action_links: [
            { text: 'Tinklapis', href: 'http://www.facebook.com/Kaunas.gyvai?sk=app_292352984114290' }
          ],
          user_message_prompt: 'Kas vyksta Kaune tiesioginės transliacijos'
        };
         FB.ui(publish, function(response) { console.log(response); });
    }
</script>

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜妞爱困 2024-12-14 16:14:52

我找到了答案。问题是我在我的应用程序中包含了“Facebook live Stream”插件,同时使用 fbAsyncInit 来调整 iframe 的大小。

我刚刚从 fb-live-stream 插件和分享功能中删除了 js.src = "//connect.facebook.net/en_US/all.js#appId=292352984114290&xfbml=1";开始工作了。

I found an answer. The problem was that I included the "Facebook live stream" plugin in my application and at the same time used fbAsyncInit to resize the iframe.

I just deleted js.src = "//connect.facebook.net/en_US/all.js#appId=292352984114290&xfbml=1"; from the fb-live-stream plugin and the share function started to work.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文