简体   繁体   English

Facebook FQL查询未返回语言字段的结果

[英]Facebook FQL query returns no results for language field

Facebook FQL query returns no results for languages field if there is a clause specifying languages id or name. 如果存在指定语言ID或名称的子句,则Facebook FQL查询不会为语言字段返回任何结果。 If there is no WHERE clause for languages then all fields are returned. 如果语言没有WHERE子句,则返回所有字段。

SELECT uid,name,languages.name FROM user WHERE uid IN (SELECT uid2 FROM friend WHERE uid1 = me()) AND (strpos(lower(languages.name), lower("English")) >= 0)

See the following link for an example: 有关示例,请参见以下链接:

https://developers.facebook.com/tools/explorer?fql=SELECT%20uid%2Cname%2Clanguages.name%20FROM%20user%20WHERE%20uid%20IN%20(SELECT%20uid2%20FROM%20friend%20WHERE%20uid1%20%3D%20me())%20AND%20(strpos(lower(languages.name)%2C%20lower(%22English%22))%20%3E%3D%200)%20 https://developers.facebook.com/tools/explorer?fql=SELECT%20uid%2Cname%2Clanguages.name%20FROM%20user%20WHERE%20uid%20IN%20(SELECT%20uid2%20FROM%20friend%20WHERE%20uid1% 20%3D%20me())%20AND%20(strpos(lower(languages.name)%2C%20lower(%22English%22))%20%3E%3D%200)%20

I have had no problems with other fields or FQL queries. 其他字段或FQL查询没有问题。 All permissions are requested for authorization token. 请求所有权限以获取授权令牌。

Apparently you can't "filter" on fields containing array, filtering on fields containing objects works as you sketched out. 显然,您不能对包含数组的字段进行“过滤”,而对包含对象的字段进行过滤就可以像您草绘出的那样工作。 I don't think this is documented in the Facbook API docs. 我认为Facbook API文档中没有对此进行记录。

See my answer here as well: FQL Query for facebook 也在这里查看我的答案: FQL查询facebook

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

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