如何从电子邮件中获取Facebook个人资料? [英] How can I get Facebook Profile image from email?

查看:113
本文介绍了如何从电子邮件中获取Facebook个人资料?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有一个名为Xobni的外观插件具有非常酷的功能,如果联系人有一个电子邮件地址,它将获取该联系人的个人资料图片并显示它。他们的常见问题解答如下:

There's an outlook plugin called Xobni that has a really cool feature, if a contact has an email address, it will fetch that contact's profile picture and display it. Their FAQ states the following:


Xobni向Facebook发送加密的电子邮件地址,以检索目前正在查看的人的Facebook个人资料Xobni侧边栏。您自己的Facebook个人资料永远不会被Xobni更改,并且在查看其他个人资料时,严格遵守所有Facebook隐私设置。

Xobni sends an encrypted email address to Facebook to retrieve the Facebook profile for the person who is currently being viewed in the Xobni sidebar. Your own Facebook profile is never altered by Xobni, and all Facebook privacy settings are strictly followed when viewing other profiles.

我想复制此功能。但是,我无法确定他们正在使用哪个API调用。我假设他们说加密的电子邮件地址是电子邮件散列的外行人士的条款。一旦用户名被导出,图形api看起来是实际获取图像的理想选择,但是我无法从邮件散列到配置文件ID。

I'd like to duplicate this functionality. However, I can't figure out which API call they're using. I'm assuming when they say "encrypted email address" that's laymen's terms for the email hash. Once a username is derived, the graph api looks ideal for actually fetching the image, but I'm having trouble going from email hash to profile ID.

推荐答案

您可以查询以下URL以获取用户ID(如果存在于Facebook上):

You can query the following URL to get user id (if one exists on Facebook):

https://graph.facebook.com/search?access_token=YOUR_ACCESS_TOKEN&q=EMAIL_ADDRESS_URL_ENCODED&type=user

然后< img src =https://graph.facebook.com/USER_ID/picture> 给你图片。

更多信息:在codinglogs.com上的文章

这篇关于如何从电子邮件中获取Facebook个人资料?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆