FaceBook sdk FQL

单个查询:

SELECT about_me,name,relationship_status,birthday_date,interests,sex,work,education FROM user WHERE uid = me()

 

多个查询

NSString *query =@"{"@"'other_info':'SELECT name,education,work FROM user where uid=780798254',"
    @"'my_info':'SELECT uid, name, pic_square FROM user WHERE uid = 780798254',"
    @"}";

 查询方法:

NSDictionary *params = [NSDictionary dictionaryWithObjectsAndKeys:query,@"q", nil];
[FBRequestConnection startWithGraphPath:@"/fql" parameters:params HTTPMethod:@"GET" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
        if (error) {
            DLog(@"Error: %@", [error localizedDescription]);
        }else{
            NSLog(@"Result: %@",result);
        }
    }];

 

posted on 2012-12-17 12:00  小浪鼓  阅读(524)  评论(0编辑  收藏  举报

导航