簡體   English   中英

Facebook的Feed按鈕不起作用

[英]feed button for facebook not working

$ i在JS consol中得到以下內容

錯誤Sharebutton發生錯誤。 請稍后再試

API錯誤代碼:191 API錯誤描述:指定的URL不歸應用程序所有錯誤消息:redirect_uri不歸應用程序所有。

同時將我的配置如下

應用顯示名稱:

應用程序命名空間:

聯系電子郵件:

應用程序域:www.somthing.com

------------------------------------ js

<script>
 window.fbAsyncInit= function() {
    FB.init({
      appId      : '204143816348127', // App ID

      status     : true, // check login status
      cookie     : true, // enable cookies to allow the server to access the session
      xfbml      : true  // parse XFBML
    });

    // Additional initialization code here
  };

  // Load the SDK Asynchronously
  (function(d){
     var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
     js = d.createElement('script'); js.id = id; js.async = true;
     js.src = "//connect.facebook.net/en_US/all.js";
     d.getElementsByTagName('head')[0].appendChild(js);
   }(document));

function kuky(){

FB.ui(
  {
   method: 'feed',
   message: 'getting educated about Facebook Connect',
   name: 'Connect',
   caption: 'The Facebook Connect JavaScript SDK',
      description: (
      'A small JavaScript library that allows you to harness ' +
      'the power of Facebook, bringing the user\'s identity, ' +
      'social graph and distribution power to your site.'
   ),
   link: 'http://www.fbrell.com/',
   picture: 'http://www.fbrell.com/f8.jpg',
   actions: [
        { name: 'fbrell', link: 'http://www.fbrell.com/' }
   ],
  user_message_prompt: 'Share your thoughts about RELL'
  },
  function(response) {
    if (response && response.post_id) {
      alert('Post was published.');
    } else {
      alert('Post was not published.');
    }
  }
);
}
</script>

191通常總是因為未從您的應用程序設置中的域中運行代碼。 另外,請確保在FB.init()中包含channelURL以獲得更好的性能。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM