I would like to get work place information of a user
using FQL.
When I use the Graph API and get the User
object, it contains work
information, which is essentially a list of the work history. The list elements contain nodes of employer
, locatio开发者_如何学Cn
, description
, etc...
The nodes appear to be pages internally. If I take the id of a node, e.g. from the employer, and use FQL to query a page
with that page_id
, I do get an object with corresponding information.
My question now is, how do I use FQL to get the same information without accessing the Graph API? What table stores the work-related information, for example how do I find all the page_id
of the employers of a given user?
The reason I insist on using FQL only is performance. Of course I could access the Graph API for all the users in question and get the info that way, but I'm looking for an FQL-only solution.
You can get this information from FQL. Read the "user" table and look for the work field. The JSON data returned should be the same format as the one for Graph, i.e., the result is an array and each result should include an "employer" object with an "id" and "name" field.
You will need user_work_history or friends_work_history to access this field.
精彩评论