1
我設法得到friendslist:IOS:獲取Facebook上的朋友誰發揮應用
//token
NSString *acessToken = [NSString stringWithFormat:@"%@",_facebookAccount.credential.oauthToken];
NSDictionary *parameters = @{@"access_token": acessToken};
// Create the URL to the end point
NSURL *friendsList = [NSURL URLWithString:@"https://graph.facebook.com/me/friends"];
// Create the SLReqeust
SLRequest *getFriends = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:friendsList parameters:parameters];
我還需要需要得到其朋友被打,卻得到一個錯誤:
me/friends?fields=installed
{
error = {
code = 2500;
message = "An active access token must be used to query information about the current user.";
type = OAuthException;
};
}
我有需要特別許可嗎?我現在這些使用方法:
@"read_stream", @"email", @"read_friendlists"
感謝
感謝您的答覆。這段代碼是否使用SLRequest?我沒有得到「[[objapp facebook]」,我是否需要爲此實現Facebook舊SDK? – BlackMouse 2013-03-11 07:36:39
我使用舊的FBconnect和使用我發佈的代碼其工作好..! – 2013-03-11 07:37:34
該解決方案似乎使用FB SDK。 iOS Social Framework中是否有等效的方法?例如使用SLRequest? – zeeple 2013-05-09 16:06:36