【问题标题】:How to get facebook friends work_history and company id?如何获取 facebook 好友 work_history 和公司 ID?
【发布时间】:2011-03-09 08:03:55
【问题描述】:

您好,我正在使用以下 FQL 从 facebook 获取好友列表及其详细信息

选择 uid、名称、work_history、 教育历史,当前位置 来自 uid IN 的用户(选择 uid2 来自 uid1=FACEBOOK_USER 的朋友);

我得到以下结果数组,它很好且正确。

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

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

数组 ( [0] => 数组 ( [uid] => 12312312312 [名称] => 拉吉·辛格 [work_history] ​​=> 数组 ( [0] => 数组 ( [公司名称] => 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] => 
    )

任何想法都受到高度赞赏......

【问题讨论】:

    标签: facebook facebook-fql facebook-friends


    【解决方案1】:

    在上面的 sql 查询中,只需添加 work,它将返回公司名称及其 id。现在如果想work_history可以忽略。

    最终查询

    选择 uid、名称、work_history、work、 教育历史,当前位置 来自 uid IN 的用户(选择 uid2 来自 uid1=FACEBOOK_USER 的朋友);

    希望对某人有所帮助。

    -deepak

    【讨论】:

      【解决方案2】:

      试试这个查询:

      选择 uid、姓名、工作、工作历史、教育历史、 current_location from user where uid IN (select uid2 from friend 其中 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] => 
                              )
      
                      )
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-09-29
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多