facebook getting user id from graph api via taggable_friends

前端 未结 5 736
死守一世寂寞
死守一世寂寞 2021-02-07 02:12

In v1.0 API I was able to get friends with their facebook ID like this:

{
      \"name\": \"Somename SomeSurname\", 
      \"id\": \"100007797060798\"
 }
         


        
5条回答
  •  醉梦人生
    2021-02-07 02:54

    may be you can get id by search people with the same picture.

    me?fields=taggable_friends{name,picture}
    
    {
            "name": "ปาณิศา หลานตากอย.ตาแก้ว คงเพ็ชร",
            "picture": {
              "data": {
                "url": "https://fb-s-c-a.akamaihd.net/h-ak-fbx/v/t1.0-1/p100x100/19113605_1931156107168776_605762913793659652_n.jpg?oh=951c7c13a85b0ce3abe8a6e7bacae127&oe=59DA354A&__gda__=1508078042_6baaa5dc05f7b1e85f7a90e8c21e517b"
              }
            },
            "last_name": "คงเพ็ชร",
            "first_name": "ปาณิศา",
            "id": "AaKW3BwqCsT_4IspPO5jlFZet-4LnXQfulxsumuI-4Mel7M-0cTX-7gbARaOJSy7JMbLDBcwCEMdBvJQmZ7-YNEN-o_EDpugQfY02UqjED_uvQ"
          }
    

    then

    search?type=user&q=ปาณิศา หลานตากอย.ตาแก้ว คงเพ็ชร&fields=id,name,picture
    
    
    "data": [
    {
      "id": "1519971271620597",
      "name": "ปาณิศา หลานตากอย.ตาแก้ว คงเพ็ชร",
      "picture": {
        "data": {
          "is_silhouette": false,
          "url": "https://fb-s-c-a.akamaihd.net/h-ak-fbx/v/t1.0-1/p50x50/19113605_1931156107168776_605762913793659652_n.jpg?oh=21c44649424500928d0299291414f1aa&oe=59A27344&__gda__=1508317043_a83bb236c462cd9d179f8e949cea801f"
        }
      }
    }
    

    ]

    the two results have same url filename 19113605_1931156107168776_605762913793659652_n.jpg then you can get id from search result 1519971271620597

提交回复
热议问题