我正在设计一个应用程序,它使用 Facebook 在表格视图中显示提要..所以为了获得提要的结果,我调用了一个方法FBSDKGraphRequest但我不知道如何从外部的FBSDKGraphRequest检索结果的值因为它们位于完成块中。我想在表格视图中显示名称和消息....
代码说明如下:-
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]initWithGraphPath:Path parameters:@{ @"fields": @"feed{from,message,created_time}",} tokenString:accessToken version:FBSDK_TARGET_PLATFORM_VERSION HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {
if(error)
NSLog(@"No Data");
else {
FeedCount = [NSDictionary dictionaryWithDictionary:result];
NSDictionary*feed = [FeedCount objectForKey:@"feed"];
NSArray*array1 = [feed objectForKey:@"data"];
NSArray*array3 = [array1 valueForKey:@"from"];
NSLog(@"Data:%@",array3); ---------------> **Displaying Data**
}
}];
NSLog(@"FeedCount:%@",FeedCount);----------------->**Showing Null**
任何帮助将不胜感激