简体   繁体   English

使用Graph API标记状态中的朋友

[英]Tag friends in status with Graph API

I have been searching around Google and this site to find answer on my question. 我一直在Google和这个网站附近搜寻,以找到有关我的问题的答案。 I found different answers and therefore I will open this question in order to get an "up to date" answer. 我找到了不同的答案,因此我将打开此问题以获取“最新”答案。

I am trying to tag a friend in a comment using the Facebook Graph API. 我正在尝试使用Facebook Graph API在评论中标记朋友。 I have read that this should be possible using @[USER_ID:USER_NAME] but I cannot seem to get it working. 我已经阅读到使用@[USER_ID:USER_NAME]应该可以,但是我似乎无法正常工作。 When I do so this will be removed from the comment and nothing else will happen. 当我这样做时,这将从评论中删除,并且不会发生任何其他情况。

Eg Hello! @[12345:John Doe] 例如, Hello! @[12345:John Doe] Hello! @[12345:John Doe] will become Hello! Hello! @[12345:John Doe]将成为Hello! when posted. 发布时。

This is my code for testing: 这是我的测试代码:

NSString *postMe = [NSString stringWithFormat:@"%@ @[MY_USER_ID:Simon St\u00f8vring]", [message text]];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:postMe, @"message", nil];
[facebook requestWithGraphPath:request andParams:params andHttpMethod:@"POST" andDelegate:self];

It takes the value from a text view, adds a tag to myself and posts the comment using the Graph API. 它从文本视图获取值,为自己添加标签,然后使用Graph API发布注释。

So, can anyone tell me if it's possible to tag friends in comments and status updates using the Graph API? 因此,有人可以告诉我是否可以使用Graph API在评论和状态更新中标记朋友?

如@jBit所述,这显然是不可能的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM