gpt4 book ai didi

ios - FBRequestConnection 无响应

转载 作者:行者123 更新时间:2023-11-29 03:35:42 26 4
gpt4 key购买 nike

我正在创建一个“FBRequestConnection”来获取所有玩游戏的 friend ...

当我将 Facebook 的 SDK 更新到最后一个时,它停止工作了。因为它以前工作过。

我没有回应,没有成功,没有错误。有什么想法吗?

NSString *query = @"SELECT uid FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND is_app_user = 1";
// Set up the query parameter
NSDictionary *queryParam = [NSDictionary dictionaryWithObjectsAndKeys:query, @"q", nil];
// Make the API request that uses FQL
[FBRequestConnection startWithGraphPath:@"/fql"
parameters:queryParam
HTTPMethod:@"GET"
completionHandler:^(FBRequestConnection *connection,
id result,
NSError *error) {
if (error) {
[self debug:[NSString stringWithFormat:@"Error: %@", [error localizedDescription]]];
} else {
[self debug:[NSString stringWithFormat:@"Result: %@", [result objectForKey:@"data"]]];
}
}];





-(void)fbLogin {
if (!_session.isOpen) {
// create a fresh session object
_session = [[FBSession alloc] init];

// if we don't have a cached token, a call to open here would cause UX for login to
// occur; we don't want that to happen unless the user clicks the login button, and so
// we check here to make sure we have a token before calling open
if (_session.state == FBSessionStateCreatedTokenLoaded) {
// even though we had a cached token, we need to login to make the session usable
[_session openWithCompletionHandler:^(FBSession *session,
FBSessionState status,
NSError *error) {
// we recurse here, in order to update buttons and labels
[[NSNotificationCenter defaultCenter] postNotificationName:@"fbConnected" object:nil];
}];
}

[self populateUserDetails];
}
}

谢谢

最佳答案

打开 session :

 [FBSession.activeSession openWithCompletionHandler:^(FBSession * session, FBSessionState state, NSError * error){
if (!error){

}
}];

关于ios - FBRequestConnection 无响应,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19216167/

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