2013-03-15 46 views
1

我在通過打開的圖發佈動作時出現以下錯誤。我有大約10個完美髮布的動作。只有這一個是給我的錯誤:發佈OpenGraph動作時出錯「至少需要指定一個引用對象」

code: 100 
"At least one reference object must be specified" 

這是我出版代碼:

FB.api(
     '/me/'+fAction, 
     'post', 
     sObject, 
    function(response) 
    { 
      if (!response || response.error) 
      { 
       for (var prop in response) 
       { 
       console.log(response[prop]); 
       callbackToFlash(0); 
       } 
      } else 
      { 
       console.log('success'+object); 
       callbackToFlash(1); 
      } 
     } 
); 

的對象和操作對上我的應用程序存在的,我驗證過。在網上搜索後,似乎是因爲facebook錯誤而導致的。哪些Facebook已標記爲已關閉。

關於如何處理它的任何想法?

+0

你在哪裏指定對象的網址?你確定你做得對嗎?你的對象類型是否具有'Object'類型的屬性?如果是這樣,你想要發佈的對象在[Facebook的調試工具](https://developers.facebook.com/tools/debug)中是否正確驗證? – Igy 2013-03-15 18:19:45

+0

它在facebook調試工具中工作得非常好,所以對象/動作對的其他部分也如此 – 2013-03-18 07:20:14

+0

當我發生此錯誤時,它是由我發送的不正確參數引起的。我建議你點擊fb dev console中故事旁邊的「獲取代碼」鏈接,並確保你發送的內容與那裏的內容相匹配 – 2013-04-18 06:23:58

回答

0

使用此代碼

var obj = {"og:title": title, "og:image": imgurl,"og:description": des}; 

     FB.ui({ 
      method: 'share_open_graph', 
      action_type: 'og.likes', 
      action_properties: JSON.stringify({ 
        object:obj 


      }) 
     }, function (response) { 
      // Debug response (optional) 
      console.log(response); 
     }); 
相關問題