简体   繁体   English

iPhone Facebook连接FQL查询以获取配置文件URL

[英]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. 我正在使用Face book Connect FQL查询来提取我的个人资料照片url,即src_big,src_small URL。

But i am always getting the empty array in below delegate 但是我总是在下面的委托中得到空数组

  • (void)request:(FBRequest*)request didLoad:(id)result (void)请求:(FBRequest *)请求didLoad:(id)结果

My FQL query is. 我的FQL查询是。

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]; NSString * fql = [NSString stringWithFormat:@“ SELECT src_big,src_small从照片WHERE pid输入(从专辑WHERE所有者=%lld AND名称='个人资料图片'选择SELECT Cover_pid)”,session.uid]; NSDictionary* params = [NSDictionary dictionaryWithObject:fql forKey:@"query"]; NSDictionary *参数= [NSDictionary dictionaryWithObject:fql forKey:@“ query”]; [[FBRequest requestWithDelegate:self] call:@"facebook.fql.query" params:params]; [[FBRequest requestWithDelegate:self]呼叫:@“ facebook.fql.query” params:params];

But - (void)request:(FBRequest*)request didLoad:(id)result always return the empty result. 但是-(void)request:(FBRequest *)request didLoad:(id)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. 好的,我错了,我认为您需要一个多查询+ JSON表示。 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];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM