Facebook Graph API Post with_tags 选项 [英] Facebook Graph API Post with_tags option
问题描述
我在使用 http://developers.facebook.com/时遇到问题文档/参考/api/post/.即,称为with_tags"的选项.
options = {"message": "Test123",with_tags":{数据":[{"id": 100001686722916, "name": "Aret Aret"}]}};FB.api('/me/feed', 'post', options, function(response) {if (!response || response.error) {alert('发生错误');控制台日志(响应);} 别的 {控制台日志(响应);}});
结果,我只收到一条消息Test123",但我的帖子中没有with"标签.我在with"部分使用的用户在我的朋友列表中,并且也是该应用程序的开发人员.谢谢.
我实际上认为with_tags"选项仅在返回提要对象时才被读取.这不是您可以发布的选项 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/>
I'm experiencing an issue with http://developers.facebook.com/docs/reference/api/post/. Namely, option called "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);
}
});
As a result, I just get a message "Test123" but no "with" tags in my post. The user I use in "with" section is on my friends list and is a developer of the app as well. Thanks.
I actually think the "with_tags" option is read only when returning the feed object. It's not an option you can POST https://developers.facebook.com/docs/reference/dialogs/feed/#graphapicall .I think what you want to use is just "tags" and it should just contain id's as specified here https://developers.facebook.com/docs/reference/api/user/#posts
**note you cannot do this though without also specifying a place
EDIT**** Facebook have now released mention tagging which might be the solution you need https://developers.facebook.com/docs/opengraph/mention_tagging/
这篇关于Facebook Graph API Post with_tags 选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!