iPhone facebook connect FQL Query to get Profile URL
Hai.
I am using Face book Connect FQL Queries to extract my profile photo url that is src_big,src_small URL.
But i am always getting the empty array in below delegate
- (void)request:(FBRequest*)request didLoad:(id)result
My FQL query is.
NSString* fql = [NSString stringWithFormat:@"SELECT src_big,src_small FROM photo WHERE pid IN (SELECT cover_pid FROM album WHERE owner =%lld AND name ='Profile Pictures')", session.uid]; NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"]; [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:开发者_如何学JAVAparams];
But - (void)request:(FBRequest*)request didLoad:(id)result always return the empty result.
Can any one please correct me if there any mistake.
Ok, I was wrong, I thought that you need a multiquery + JSON presentation for that. Here is my code
NSString *albumFql = [NSString stringWithFormat:@"SELECT cover_pid, name FROM album WHERE owner =%lld", self.session.uid];
NSDictionary *fqlsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
albumFql, @"album",
nil];
NSDictionary *params = [NSDictionary dictionaryWithObject:[fqlsDictionary JSONRepresentation] forKey:@"queries"];
[[FBRequest requestWithDelegate:self] call:@"facebook.fql.multiquery" params:params];
精彩评论