Get Facebook User ID By Email Address

后端 未结 1 1363
天命终不由人
天命终不由人 2021-02-08 04:33

We have over 10,000 registered users on our site and want to associate each user with a Facebook account with their facebook ID. Our site uses the WWW::Facebook::API CPAN module

相关标签:
1条回答
  • 2021-02-08 04:44

    Yes, you can. In a way.

    The new Search API allows you to search publicly available information about users.

    https://graph.facebook.com/search?q=mailbox@example.com&type=user
    

    As long as the email address you are searching for is public on Facebook (i.e., the user has it set that way in their preferences), it will return the user's name and Facebook ID.

    The JSON

    {
       "data": [
          {
             "name": "John Doe",
             "id": "123456789"
          }
       ]
    }
    
    0 讨论(0)
提交回复
热议问题