Facebook graph api Facebook API共享显示错误“;对不起,出了点问题。我们';我们正在努力尽快修复这个问题。”;

Facebook graph api Facebook API共享显示错误“;对不起,出了点问题。我们';我们正在努力尽快修复这个问题。”;,facebook-graph-api,facebook-javascript-sdk,Facebook Graph Api,Facebook Javascript Sdk,我正在使用Facebook开发共享功能。登录功能工作正常。但当我尝试使用示例代码共享某些内容时,它显示为 对不起,出了点问题 我们正在努力尽快把这个修好 我使用的代码是 $('#fb_test').on('click', function(e){ e.preventDefault(); FB.ui( { method: 'feed', name: 'This is the content of the "name" fi

我正在使用
Facebook
开发共享功能。登录功能工作正常。但当我尝试使用示例代码共享某些内容时,它显示为

对不起,出了点问题

我们正在努力尽快把这个修好

我使用的代码是

$('#fb_test').on('click', function(e){
    e.preventDefault();
    FB.ui(
    {
        method: 'feed',
        name: 'This is the content of the "name" field.',
        link: 'URL which you would like to share ',
        picture: "URL of the image which is going to appear as thumbnail image in share dialogbox",
        caption: 'Caption like which appear as title of the dialog box',
        description: 'Small description of the post',
        message: ''
    }
    );
});

使用此代码而不是您的代码,这将很好地工作

首先在body标记后引用此fb脚本

<script>
    window.fbAsyncInit = function() {
        FB.init({
            appId      : 'app_id',
            xfbml      : true,
            version    : 'v2.8'
        });
        FB.AppEvents.logPageView();
    };

    (function(d, s, id){
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) {return;}
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/sdk.js";
        fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));
</script>

这将对您有效:)

似乎由于各种原因都可能发生此错误,但他们不会告诉您问题所在

在我的例子中,我从hashtag字段中省略了#,这显然是完全失败的原因

win.FB.ui({
  method: 'share',
  href,
  hashtag: '#wow', // NOT 'wow'
})
win.FB.ui({
  method: 'share',
  href,
  hashtag: '#wow', // NOT 'wow'
})