2015-07-20 108 views
-1

與我的FB飼料中添加提標籤(@標籤)我想提一提標籤用戶/頁面(即如使用normaly Facebook的@符號標記)在我的飼料。我曾嘗試以下圖形API,無法通過API

https://graph.facebook.com/v2.4/feed 

與下面的參數,

message = "My message @[<user_id>:1:<username>]" 

我想這從圖形API資源管理器中,飼料是越來越貼,但人/頁,其中我標記不工作,這不來了,因爲它即將作爲一個純文本的鏈接。

我要發佈我一樣附着在圖像中顯示的進給,我怎麼能實現它需要幫助,

enter image description here

+1

您不能在通過API製作的普通帖子中標記用戶。 – CBroe

回答

2

補充@託比的答案。以下是關於如何發佈帖子和標記好友的完整示例:

FB.api(
    "/me/feed", 
    "POST", 
    { 
     "message": "This is a test message", 
     "place": "link", 
     "tags": "friend_id1,friend_id2" 
    }, 
    function (response) { 
     if (response && !response.error) { 
     console.log(response); /* post id will be returned */ 
     } 
    } 
);