FQL profile.pic_square和thread.subject [英] FQL profile.pic_square and thread.subject

查看:265
本文介绍了FQL profile.pic_square和thread.subject的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是有可能得到一个加入Facebook的API中的两个表,用FQL?

is it possible to get a join of two tables in the Facebook API, with FQL?

与SQL风格鸵鸟政策工作的经典方法。

The classic way with SQL style don´t work.

希望你能帮助:)

PS:WINNING:)

PS: WINNING :)

推荐答案

文档是


Facebook Query Language, or FQL, enables you to use a SQL-style interface to query the data exposed by the Graph API. It provides for some advanced features not available in the Graph API, including batching multiple queries into a single call.
You can execute FQL queries by fetching https://api.facebook.com/method/fql.query?query=QUERY. You can specify a response format as either XML or JSON with the format query parameter.
Queries are of the form SELECT [fields] FROM [table] WHERE [conditions]. Unlike SQL, the FQL FROM clause can contain only a single table. You can use the IN keyword in SELECT or WHERE clauses to do subqueries, but the subqueries cannot reference variables in the outer query's scope. Your query must also be indexable, meaning that it queries properties that are marked as indexable in the documentation below.
FQL can handle simple math, basic boolean operators, AND or NOT logical operators, and ORDER BY and LIMIT clauses.
For any query that takes a uid, you can pass me() to return the logged-in user. For example:
SELECT name FROM user WHERE uid = me() 
Other functions that are available are now(), strlen(), substr() and strpos().
Here's an example of a subquery that fetches all user information for the active user and friends:
SELECT uid, name, pic_square FROM user WHERE uid = me()
OR uid IN (SELECT uid2 FROM friend WHERE uid1 = me())

他们没有提及的加入。所以,在我看来,你不能做到这一点。

They have not mentioned join. So in my opinion you cannot do this.

这篇关于FQL profile.pic_square和thread.subject的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆