如何从登录电子邮件地址获取Facebook用户ID [英] How to get a facebook user id from the login email address

查看:215
本文介绍了如何从登录电子邮件地址获取Facebook用户ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法从他们的登录电子邮件地址获取用户的Facebook用户ID?

Is there a way to get a user's facebook user id from their login email address?

我想要一个API调用,我可以提供 joe@example.com 并获取Facebook用户ID 342255534

I want an API call where I can provide joe@example.com and get facebook user id 342255534.

我会使用该ID调用 http://graph.facebook.com/342255534/picture?type=large

我最近发现的是 https://graph.facebook.com/search?q=EMAILADDRESS&type=user&access_token=ACCESSTOKEN ,但这需要访问令牌,我希望避免。

The closest thing I've found is https://graph.facebook.com/search?q=EMAILADDRESS&type=user&access_token=ACCESSTOKEN, but that requires an access token, which I'm hoping to avoid.

我知道这不是它应该如何工作,但是有没有办法获得通用访问令牌?

I know this isn't how it's supposed to work, but is there a way to get a generic access token?

推荐答案

您可以使用自己的access_token作为应用程序,并将其更改为长期访问令牌,以便您可以在cron中进行API调用。唯一的问题是您必须经常登录到应用程序以更新访问令牌。

You can use your own access_token for the application, and change it to a long-lived access token so you can make the API call in a cron. The only issue is that you will have to login to the app every so often to update the access token.

更新:用户搜索API现在已被弃用,因此您无法使用电子邮件地址进行搜索。但是基于名称的搜索仍然可行。

UPDATE: The User Search API is now deprecated, so you cannot search using email addresses. But name based searches still work.

这篇关于如何从登录电子邮件地址获取Facebook用户ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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