0

ゲームをプレイするすべての友達を取得するために「FBRequestConnection」を作成しています...

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];
    }
}

ありがとう

4

1 に答える 1

1

次を使用してセッションを開きます。

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

        }
    }];
于 2013-10-07T03:13:00.780 に答える