【发布时间】:2017-11-22 03:43:48
【问题描述】:
NSString *path = [NSString stringWithFormat:@"/%@/cmets",liveId]; FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc] initWithGraphPath:路径参数:@{@"fields" : @"attachment_id,attachment_share_url,attachment_url,is_offline,message,text"}]; NSMutableArray *mArr = [NSMutableArray 数组]; [请求 startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) { 如果(!错误){
if (result) {
NSArray *arr = [result objectForKey:@"data"];
for (NSDictionary *dic in arr) {
EVOLiveItem *commentItem = [[EVOLiveItem alloc] init];
commentItem.commentItem.userName = dic[@"id"];
commentItem.commentItem.commentContent = dic[@"message"];
[mArr addObject:commentItem];
}
completion(mArr);
}
【问题讨论】:
-
我只能猜到你想在这里问什么(请阅读How to Ask!) - 对任何页面对象的请求将不再包含用户信息,除非你使用页面访问令牌有问题的页面。 developers.facebook.com/docs/graph-api/changelog/…
标签: facebook