0

我使用这个查询:

SELECT id, author_uid, message, latitude, longitude, timestamp FROM location_post WHERE author_uid IN (SELECT uid2 FROM friend WHERE uid1=me()) ORDER BY timestamp DESC";

我的问题是如何显示海报中的名称,因为没有 SELECT name FROM location_post。我希望有人能帮助我。

谢谢!

4

2 回答 2

0

获取 author_id 并发出新的 FQL 或图形 api 请求

假设 author_id 是 123。

问题解答:

SELECT name FROM user WHERE uid = 123

图形 API

http://graph.facebook.com/123?fields=name
于 2013-01-16T14:43:35.063 回答
0

您需要将其作为查询执行:

{"locations":"SELECT id, author_uid, message, latitude,...",
 "authors":"SELECT name, id FROM profile WHERE id IN 
            (SELECT author_uid FROM #locations")}
于 2013-01-16T14:57:05.930 回答