您好我正在使用以下FQL从Facebook获取好友列表及其详细信息
选择uid,name,work_history, education_history,current_location 来自uid IN的用户(选择uid2 来自朋友,其中uid1 = FACEBOOK_USER);
我得到以下结果数组,这是正确的。
现在我的问题是如何获得朋友工作的公司ID。公司的唯一标识符,以便我可以使用例如公司获取公司特定的详细信息。 http://graph.facebook.com/cocacola(获取cocacola公司/粉丝页面详情的一个例子)???
例如在GO-AdventureSports工作的朋友也应该在数组中有唯一的标识符。
阵 ( [0] =>排列 ( [uid] => 12312312312 [name] =>拉吉辛格 [work_history] =>排列 ( [0] =>排列 ( [company_name] => Intersil公司 )
)
[education_history] => Array
(
)
[current_location] => Array
(
[city] => Santa Clara
[state] => California
[country] => United States
[zip] =>
[id] => 1231231231
[name] => Santa Clara, California
)
)
[1] => Array
(
[uid] => 123123123
[name] => Rana Sidhu
[work_history] => Array
(
[0] => Array
(
[location] => Array
(
[city] =>
[state] =>
)
[company_name] => GO-AdventureSports
[description] =>
[start_date] =>
[end_date] =>
)
)
[education_history] => Array
(
)
[current_location] =>
)
任何想法都受到高度赞赏......
答案 0 :(得分:0)
在上面的sql查询中,只需添加工作,它将返回公司名称及其ID。现在,如果想要 work_history ,可以忽略。
最终查询
选择uid,name,work_history,work, education_history,current_location 来自uid IN的用户(选择uid2 来自朋友,其中uid1 = FACEBOOK_USER);
希望对某人有所帮助。
-deepak
答案 1 :(得分:0)
尝试此查询:
选择uid,name,work,work_history,education_history, 来自用户的current_location,其中uid IN(从朋友中选择uid2) 其中uid1 = FACEBOOK_USER);
work在facebook上提供公司名称及其id,而work_history不提供id仅提供明确信息。
参见以下输出:
[work] => Array
(
[0] => Array
(
[employer] => Array
(
[id] => 105551752814478
[name] => Fujitsu Consulting India Ltd
)
[location] => Array
(
[id] => 106442706060302
[name] => Pune, Maharashtra
)
[position] => Array
(
[id] => 139966739368093
[name] => IT Consultant
)
[start_date] => 2009-10
[end_date] => 0000-00
)
[1] => Array
(
[employer] => Array
(
[id] => 109256905760858
[name] => Fujitsu
)
)
)
[work_history] => Array
(
[0] => Array
(
[location] => Array
(
[city] => Pune
[state] => Maharashtra
)
[company_name] => Fujitsu Consulting India Ltd
[position] => IT Consultant
[description] =>
[start_date] => 2009-10
[end_date] => 0000-00
)
[1] => Array
(
[location] => Array
(
[city] =>
[state] =>
)
[company_name] => Fujitsu
[description] =>
[start_date] =>
[end_date] =>
)
)