2011-03-09 16 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] => 
         ) 

       )