2011-03-09 17 views
1

嗨,我使用下面的FQL来从Facebook获取好友列表和它们的细节如何让Facebook好友work_history和公司ID?

选择UID,名字,work_history, education_history,从用户CURRENT_LOCATION 其中uid IN(选择UID2从朋友 其中UID1 = FACEBOOK_USER );

我得到了下面的结果数组,它是正确的。

现在我的问题是任何有可能得到朋友工作的公司ID。公司的唯一标识符,以便我可以使用例如 http://graph.facebook.com/cocacola(获取可口可乐公司/粉丝页详情的例子)

如GO-AdventureSports中的朋友在数组中也应该有唯一的标识符。

阵列 ( [0] =>数组 ( [UID] => 12312312312 [名称] =>拉吉辛格 [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] => 
    ) 

任何想法是highl y赞赏...

回答

0

在上面的sql查询只需添加工作,它会返回公司名称与他们的ID。现在如果想要work_history可以忽略。

最终查询

选择UID,名称,work_history,工作, education_history,从用户CURRENT_LOCATION 其中uid IN(来自朋友选择UID2 其中UID1 = FACEBOOK_USER);

希望它有助于某人。

-deepak

0

尝试此查询:

选择UID,姓名,工作,work_history,education_history,从用户 CURRENT_LOCATION其中uid IN(从朋友 选择UID2其中UID1 = FACEBOOK_USER);

工作提供公司名称与它的id在facebook和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] => 
         ) 

       )