views:

60

answers:

1

i am trying to fetch 10 friends list using fbconnect my query is like this

NSString* fql = [NSString stringWithFormat:@"select uid from user where uid == %lld LIMIT 1,10", _session.uid];

NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"];

[FBRequest requestWithDelegate:self] call:@"facebook.friends.get" params:params];

but it is fetching all the friends list any one help me....

A: 

NSString* fql =[NSString stringWithFormat:@"SELECT uid,name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = %lld) LIMIT 1,10",_session.uid];

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

[_facebook requestWithMethodName: @"fql.query" 
                       andParams: params
                   andHttpMethod: @"POST" 
                     andDelegate: self]; 
priyanka
nice to see indian iphone developers...
jeeva
@jeeva thank you
priyanka
@priyanka thank u for answer...
jeeva