2
Facebook SDK 3. +有requestForMyFriends,並返回FBGraphUser,但它沒有組名屬性,有沒有辦法讓所有的組屬於用戶?如何取回Facebook好友的羣組名稱?
Facebook SDK 3. +有requestForMyFriends,並返回FBGraphUser,但它沒有組名屬性,有沒有辦法讓所有的組屬於用戶?如何取回Facebook好友的羣組名稱?
您可以使用FB Open Graph和SLRequests輕鬆獲取所有用戶的組。確保您已經通過身份驗證,然後撥打電話:
NSURL *groups = [NSURL URLWithString:@"https://graph.facebook.com/me/groups"];
SLRequest *retrieveGroups = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:groups parameters:nil];
[retrieveGroups performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error)
{
//responseData contains your groups
}];