gpt4 book ai didi

ios6 - ACAccount Facebook : An active access token must be used to query information about the current user

转载 作者:行者123 更新时间:2023-12-04 17:37:32 24 4
gpt4 key购买 nike

我正在使用 iOS 6 社交框架来访问用户的 Facebook 数据。我正在尝试使用 ACAccount 在我的应用程序中获得当前用户的喜欢和 SLRequest .我有一个有效的 Facebook 帐户引用,类型为 ACAccount命名 facebook ,我试图通过这种方式获得用户的喜欢:

SLRequest *req = [SLRequest requestForServiceType:SLServiceTypeFacebook requestMethod:SLRequestMethodGET URL:url parameters:nil];
req.account = facebook;
[req performRequestWithHandler:^(NSData *responseData, NSHTTPURLResponse *urlResponse, NSError *error) {
//my handler code.
}

哪里 url@"https://graph.facebook.com/me/likes?fields=name";在我的处理程序中,我收到以下回复:
{
error = {
code = 2500;
message = "An active access token must be used to query information about the current user.";
type = OAuthException;
};
}

访问 token 不应该由框架处理吗?我发现了一个类似的帖子 Querying Facebook user data through new iOS6 social framework但是将访问 token 参数硬编码到 URL 中是没有意义的,因为从逻辑上讲,访问 token /登录检查应该由框架自动处理。在我见过的所有示例中,没有人手动使用访问 token :

http://damir.me/posts/facebook-authentication-in-ios-6

iOS 6 Facebook posting procedure ends up with "remote_app_id does not match stored id" error
等等。

我将 iOS6-only 方法与内置社交框架一起使用,我没有使用 Facebook SDK。我错过了什么吗?

谢谢,

能。

最佳答案

您需要保持对帐户来自的 ACAccountStore 的强引用。如果商店被解除分配,看起来它会导致这个问题。

关于ios6 - ACAccount Facebook : An active access token must be used to query information about the current user,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13788689/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com