2012-05-02 60 views
2

根據文檔,鏈接端點將圖片,名稱和描述作爲參數。 從https://developers.facebook.com/docs/reference/api/下Publishing部分發佈到/ PROFILE_ID /鏈接只接受鏈接和郵件參數

Method     Description       Arguments 

/PROFILE_ID/links Publish a link on the given profile  link, message, picture, name, caption, description 

然而,當我嘗試這些參數將被忽略。下面的Python例子。

res = requests.post("https://graph.facebook.com/me/links", 
        data = {'access_token':t.auth_payload, 
          'message':'testing', 
          'link':'http://percolate.com', 
          'picture':'http://i.zdnet.com/blogs/facebook_news_feed.png', 
          'caption':'this is a caption', 
          'description':'this is a description', 
          'name':'this is a name'}) 

導致:

This is the result

回答

0

跟進這個問題。鏈接端點變得越來越無用,而/ feed端點終於擁有了我所需要的功能。/feed用於發佈鏈接時丟失共享操作。那已經被修復了。

如果您遇到鏈接端點問題。切換到/ feed並查看它是否滿足您的需求。

1

有關創建一個鏈接,用戶的文檔僅規定如下:

您可以通過張貼在代表用戶的鏈接使用publish_stream權限和以下參數向PROFILE_ID/feed發出HTTP POST請求。

參數:鏈接和消息

其他字段從「鏈接」 PARAM給出的頁面URL的元數據服用。

https://developers.facebook.com/docs/reference/api/user/

+0

看出版這裏 下 https://developers.facebook.com/docs/reference/api/ 方法\t說明\t參數 /PROFILE_ID /鏈接\t發佈指定的配置文件\t鏈路上的鏈接,留言,圖片,名稱,標題,說明 –

+0

另外,我必須使用/ links端點,因爲我需要共享功能,並希望將via作爲數據的一部分,而不是在下面。 –