我正在使用Facebook SDK。我的简单问题是。 Facebook SDK是否允许我们在某个特定群组中发布Feed?如果是,请提供graphPath请求。我一直致力于获取Facebook群组列表。
- (void) getGroupList
{
FBRequest* req = [FBRequest requestForGraphPath:@"/me/?fields=name,groups"];
FBRequestConnection* reqconn = [[FBRequestConnection alloc] init];
[reqconn addRequest:req completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error){
FBGraphObject *graphObject = result;
id<FBGraphUser> graphUser = (id <FBGraphUser>)graphObject;
NSArray *groupsArray = [[graphUser objectForKey:@"groups"] objectForKey:@"data"];
for (id groups in groupsArray)
{
NSString *groupName = [groups objectForKey:@"name"];
NSLog(@"Group Name:%@ ", groupName);
}
}];
[reqconn start];
}
答案 0 :(得分:0)
试试这个:
[FBRequestConnection startWithGraphPath:@"/{group-id}/feed"
parameters:nil
HTTPMethod:@"GET"
completionHandler:^(
FBRequestConnection *connection,
id result,
NSError *error
) {
/* handle the result */
}];