2011-02-09 7 views
8

iOSでグラフAPIのFQLを使用した人は誰ですか? 私は異なるグループからのユーザーの投稿を取得しようとしています 私はFQLのドキュメント を読んでいますが、私は進歩を助けるために例を見る必要がありますか?ベルトランが言及した方法が存在していない最後のiOS SDKでは、iOSのFQLとグラフAPI

NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
           @"SELECT uid,name FROM user WHERE uid=4", @"query", 
           nil]; 
[facebook requestWithMethodName: @"fql.query" 
         andParams: params 
        andHttpMethod: @"POST" 
         andDelegate: self]; 

答えて

11

を助けてください は一例です。

NSString *query = [NSString stringWithFormat:@"YOUR_QUERY_HERE"]; //begins from SELECT........ 

NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
           query, @"q", 
           nil]; 

FBRequest *request = [FBRequest requestWithGraphPath:@"/fql" parameters:params HTTPMethod:@"GET"]; 

[request startWithCompletionHandler:^(FBRequestConnection *connection, id result, NSError *error) { 
    //do your stuff 
}]; 

//or you can do it also with the following class method: 

[FBRequestConnection startWithGraphPath:@"/fql" parameters:params HTTPMethod:@"GET" completionHandler:^(FBRequestConnection *connection, 
              id result, 
              NSError *error) { 
    //do your stuff 
}]; 

出典:https://developers.facebook.com/docs/howtos/run-fql-queries-ios-sdk/

今、あなたは、このようにそれを行う必要があります
8

:ここ

関連する問題