[英]Facebook Graph API Post with_tags option
我遇到了http://developers.facebook.com/docs/reference/api/post/的問題。 即,選項稱為“with_tags”。
options = {
"message": "Test123",
"with_tags": {
"data":[
{"id": 100001686722916, "name": "Aret Aret"}
]
}
};
FB.api('/me/feed', 'post', options, function(response) {
if (!response || response.error) {
alert('Error occured');
console.log(response);
} else {
console.log(response);
}
});
因此,我只是在帖子中收到一條消息“Test123”但沒有“with”標簽。 我在“with”部分中使用的用戶位於我的朋友列表中,並且也是該應用的開發者。 謝謝。
我實際上認為“with_tags”選項在返回feed對象時是只讀的。 這不是你可以發布一個選項https://developers.facebook.com/docs/reference/dialogs/feed/#graphapicall 。我想你想使用什么是公正的“標簽”,它應該只包含的ID為這里指定HTTPS ://developers.facebook.com/docs/reference/api/user/#posts
**請注意,如果不指定地點,則無法執行此操作
編輯**** Facebook現已發布提及標記,這可能是您需要的解決方案https://developers.facebook.com/docs/opengraph/mention_tagging/
以下是有關如何在標記某些朋友時發布到用戶Feed的示例:
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 */
}
}
);
來自: https : //developers.facebook.com/docs/graph-api/reference/v2.5/user/feed
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.