2011-07-11 21 views
1

我正在使用Facebook Graph API在當前登錄用戶的朋友牆/飼料上發表帖子。 我希望它能夠在牆貼中顯示三個動作鏈接。屬性必須是字典! - Facebook圖形API

這是因爲這裏記錄下「出版」一節中的POST請求:https://graph.facebook.com/10000000006549/feed
但其捐贈:http://developers.facebook.com/docs/reference/api/

我已經設置CURLOPT_POSTFIELDS如下

(
    [access_token] => 161318CRR8l0EBFXGhd-00.131037840000000862225914|R5i30nmZr6yKICbHayaDzZ02f_Y 
    [message] => This is a test message. 
    [picture] => http://www.mydoain.com/mylogo.jpg 
    [link] => http://www.mydoain.com/check.php 
    [actions] => {name:"View Demo",link:"http://www.mydomain.com/demo",name:"View Features",link:"http://www.mydomain.com/features"} 
    [name] => Click to Visit 
    [caption] => 
    [properties] => properties: [ 
       { 
        name: "Demo", 
        text: "View Demo", 
        href: "http://www.mydomain.com/demo", 
       }, 
       { 
        name: "Features", 
        text: "View Features", 
        href: "http://www.mydomain.com/features", 
       }, 
      ] 
    [description] => 
    [source] => 
) 

而且POST請求到由我跟隨錯誤:

{ 
    "error": { 
     "type": "OAuthException", 
     "message": "(#100) properties must be a dictionary" 
    } 

爲什麼我得到這個OA例外?我應該做些什麼改變才能在牆貼上有3個動作鏈接?

請指引我....

回答

0

這可能是一個錯誤或Facebook的結束一個文檔的問題。在他們的Graph API文檔中,/ feed被列爲僅接受消息,圖片,鏈接,名稱,標題,描述和源參數。然而,流屬性文件中仍然提到了屬性參數,這是其他參數詳細記錄的唯一地方。所以,最終,雖然我不知道什麼是錯的,但是看起來好像代碼沒有問題。 (我得到了同樣的問題,無論哈希和數組我提供該財產的,其排列。)

http://developers.facebook.com/docs/reference/api/ http://developers.facebook.com/docs/guides/attachments/

相關問題