问题标签 [profile-picture]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
5 回答
3261 浏览

php - 检索仅具有电子邮件地址的 Facebook / Google+ / Linkedin 个人资料图片

我需要的

我需要为只知道他的电子邮件地址的用户自动查找和下载个人资料图片。最初,考虑到积极使用它的人数,我专注于 Facebook。但是,他们的 API 似乎不再提供直接支持。

这里有类似的问题: How to get a facebook user id from the login email address这已经过时了,目前的答案是“它已被弃用”/“不可能”......编辑:我发现了更好的问题:通过已知的电子邮件地址查找 Facebook 用户(个人资料页面的 URL)(实际上解释了为什么以及何时不支持此功能)

一定有办法...

是什么让我认为这应该是可能的,因为Spokeo正在以某种方式做到这一点: http ://www.spokeo.com/email-search/search?e=beb090303%40hotmail.com

有一些服务/API 提供这种功能:
Clearbit Pipl
...
但我没有找到任何免费的东西。

备择方案

如果有一些解决方法或不同的方法而不是使用 Facebook 的 API 来实现这一点,我想知道。如果 Facebook 在这里真的完全没有希望,那么结合这些:Google+Linkedin和/或Gravatar就可以了。


我的第一次(原始)尝试:

一旦你有了 Facebook 的用户名或用户 ID,就很容易建立 URL 来下载图片。因此,我尝试使用带有/searchGraph API 的电子邮件来查找 Facebook 的用户 ID:
https://graph.facebook.com/search?q=beb090303@hotmail.com&type=user&access_token=TOKEN

不幸的是,它总是以“请求此资源需要用户访问令牌”结尾。

使用 FB PHP API + FB App ID & Secret

我也试过这个:起初我access_token使用应用程序 ID 和秘密检索,然后我尝试将它用作/search请求的一部分curl

输出类似:

其他信息

由于它要求“用户访问令牌”,我还尝试访问 Facebook 的 Graph Explorer:https ://developers.facebook.com/tools/explorer/ 让它为我生成访问令牌并查询: search?q=beb090303@hotmail.com&type=user&debug=all 那个以:

...所以 Facebook 在这里似乎有点绝望。

0 投票
1 回答
495 浏览

facebook - Facebook 获得喜欢的个人资料图片

我想在 Facebook 中获得喜欢的个人资料图片。

我刚刚发现我可以得到图片https://graph.facebook.com/id/picture

而且我找到了不同的 FQL 解决方案来获取点赞数,但 FQL 自 2.0 以来已被弃用,我需要喜欢个人资料图片的用户的 ID。

有没有办法得到这个?

0 投票
1 回答
1294 浏览

android - android中的圆形轮廓图像

我使用下面的代码在 android 中制作圆形头像

http://www.androidhub4you.com/2014/10/android-custom-shape-imageview-rounded.html

但在我的主要活动中,我使用 ListFragment 而不是 Activity

我收到此错误

0 投票
2 回答
675 浏览

android - 将 facebook 的头像设置为 LinearLayout 背景

Linearlayout我一直在尝试将我的 facebook 个人资料图片设置为我的应用程序中的背景,但无济于事。这是我尝试执行此操作的两种方法:

第一种方式:从头像中获取uri并将其转换为drawable

现在这总是抛出一个异常,所以Drawable我得到的是 blue_material 一个(Drawablecatch 块中的集合),所以如果有人知道它为什么一直抛出异常,我将不胜感激。

第二种方式:转换ProfilePictureViewImageView然后用getDrawable()ImageView.

现在,当某人没有个人资料图片时,这会导致背景带有 Facebook 放置的默认图片。

并且每当我使用 decodeStream 时都会引发异常。(下面的示例)

我不想求助于在stackoverflow上问这个问题,因为我想自己解决它,但是我尝试了很长时间,所以我不得不寻求帮助。

感谢任何回答的人:)

0 投票
1 回答
717 浏览

ios - 从 ios 中的新 Facebook sdk 4 获取用户个人资料图片

我正在开发一个应用程序,现在我已经在其中实现了 Facebook 我想在我的应用程序中获取 Facebook 用户个人资料图片和生日。我搜索了网络,但所有教程都是 2 或 3 岁。

我已经设置了权限,例如..

并用代码获取

但输出是

}

为什么我没有收到生日和头像信息?

0 投票
1 回答
2600 浏览

python - django-allauth: Check whether user signed up using a social account

So I have integrated django-allauth in my app, and now users have the ability to log in via instagram. Let's say I have a model called UserProfile and it has a field

user_avatar = models.ImageField(upload_to='profile_images', blank=True, default=None)

And with that I have a signal that creates a user profile as soon as a new user registers:

So usually when the user registers the user_avatar is blank since the default is set as None, now I want to add in the signal(if that's the correct way of doing it), to check if the user created his account via signing in using instagram, to go and fetch his profile picture and use it in the user_avatar. I think it's possible https://instagram.com/developer/endpoints/users/, but since I am a complete noob in python and django I don't know how to exactly do it.

So I found this signal from the django-allauth docs allauth.socialaccount.signals.pre_social_login(request, social_login) so this states that I can check that the user has signed up using a social account, but how would I use it with my create_user_profile function? The steps that I thought of is to first create the profile which I did and then to check whether the user signed up using a social account or not, if they did then the user_avatar which use their instagram profile picture and if not it would stay as none.

And as a plus I know that I can fetch the users social account profile picture in a template using {{user.socialaccount_set.all.0.get_avatar_url}}, but I don't want to do it via templates rather than doing it via Models which is the best way.

This might look really stupid but I gave it a go and tried to come up with something (this is what a newbie thinks would work, I thought this on top of my head, as I have no idea if this how signals work)

UPDATE Got it working with the help of @bellum! Thank you!

Here is the code that I used:

models.py

3utils.py

settings.py

The signal for creating the profile on sign up in my models was left the same, just added an SocialAccountAdapter!

0 投票
1 回答
6840 浏览

office365 - Skype for business 中禁用的编辑或删除图片按钮

我在 Skype for business 中禁用了编辑或删除按钮。我也无法在 portal.office.com/Profile 中更新我的个人资料图片。它说访问被拒绝。附有截图在此处输入图像描述。提前致谢!

在此处输入图像描述

0 投票
1 回答
37 浏览

ios - 尝试设置 PFUser 的个人资料图片时出现致命错误

我试图设置注册页面,以便用户可以设置个人资料图片,但是一旦我按下注册按钮并进入注册页面,它就会因为个人资料图片代码而不断崩溃。这是设置头像的按钮

这是发送数据以在viewDidLoad()方法中解析的代码

不断崩溃的行是 let profilePicture.... 行给出错误:致命错误:在展开可选值(lldb)时意外发现 nil

0 投票
3 回答
1319 浏览

android - 将 Facebook ProfilePictureView 转换为位图以在 ImageView 中使用

我正在尝试转换从 Facebook 返回的个人资料图像并将其更改为位图,以便我可以在需要位图的方法中使用它。我可以使用下面的代码获取个人资料图片并将其放入 ProfilePictureView。我还创建了另外两个用于测试的视图……一个 CircleImageView 和一个 ImageView。到目前为止,只有 ProfilePictureView 显示图像。这是我尝试过的代码示例,尽管我尝试了几种我在网上找到的创建位图的方法,但都没有奏效。任何建议/解决方案将不胜感激!

使用调试器并单步执行,我发现 bmp 为空。我尝试了其他一些方法,并且发生了同样的事情。帮助!

0 投票
1 回答
913 浏览

c# - 无法在 UWP 中获取联系人个人资料图片

我在 Windows 10 UWP (C#/XAML) 项目中使用 ContactPicker.PickContactAsync() api。我尝试使用我自己的代码和来自 Windows 10 示例 github 存储库的示例项目,它们都具有相同的 symtpom。同样的症状也出现在桌面操作系统和移动操作系统上,尽管我目前主要对移动操作系统感兴趣。

当我调用 PickContactAync 方法时,系统选择器 UI 会按预期显示。我滚动浏览我的联系人并选择一个在选择器中显示个人资料图像的联系人(我选择哪个联系人似乎并不重要,他们的行为方式都相同)。

联系人对象返回包含有效的详细信息(即联系人姓名、电子邮件地址等),但 SourceDisplayPicture、LargeDisplayPicture、SmallDisplayPicture 和 Thumbnail 属性均为空。我找不到任何方法来获取联系人的个人资料图像,即使我专门选择了一个在选择器 UI 中显示图像的联系人。

有谁知道如何获取个人资料图片?