2011-02-07 91 views

回答

-1
//try this code 

- (void) getFriendName :(id) sender { 

     self.modeString = @"friendName"; 

     NSString * query = [NSString stringWithFormat:@"SELECT name FROM user WHERE uid IN (SELECT uid1 FROM friend WHERE uid2=me())",appDelegate.friendList]; 
     NSLog(@"query :%@",query); 
    // NSString * query = [NSString stringWithFormat:@"SELECT uid, first_name, last_name, birthday_date, sex, pic_square, current_location, hometown_location FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND strlen(birthday_date) != 0 ORDER BY birthday_date",appDelegate.friendList]; 
     NSMutableDictionary * params = [NSMutableDictionary dictionaryWithObjectsAndKeys: 
             query, @"query", 
             nil]; 
     [_facebook requestWithMethodName:@"fql.query" 
           andParams:params 
          andHttpMethod:@"POST" 
          andDelegate:self]; 
    } 
相關問題