使用Facebook登录时未填写个人资料
Profile Not Filling When Signing In With Facebook
在我的MeteorJs应用程序中,当他们使用Facebook登录时,你可以使用Facebook登录,他们的个人资料不会自动填写。
addFacebookInformationToProfile() {
if (Meteor.isServer) {
// This will only merge in information the first time, then ignore it once the flag is true
const user = Meteor.user();
let username = slugify(user.services.facebook.name, '');
let i = 1;
while (Meteor.users.findOne({username})) {
username = slugify(user.services.facebook.name, '') + '' + i;
i++;
}
Meteor.users.update({ _id: Meteor.userId(), 'profile.facebook': { $ne:true }}, {
$set: {
'profile.email': user.services.facebook.email,
'profile.name': user.services.facebook.name,
'username': username,
'profile.gender': user.services.facebook.gender,
'profile.picture': "https://graph.facebook.com/" + user.services.facebook.id + "/picture/?width=150&height=150",
'profile.facebook': true
}
});
}
},
当我console.log
个人资料图片行时,我会得到一个url,当在浏览器中输入时,它会显示Facebook用户的个人资料图片。
例如:(http://graph.facebook.com/100004071683764/picture/?width=150&高度=150)
这就是它在实际应用程序中的显示方式:(https://www.dropbox.com/s/6n1svdq56x6ctx8/Screenshot%202016-05-13%2017.24.06.png?dl=0)
如何在上面的圆圈中显示用户的个人资料图片,而不是圆圈周围的灰色框。
背景:
我们正在使用imgix和s3来获取我们的数据。
该应用程序托管在relyphe.com
使用
<img class="img-circle" >
这将使您的个人资料图片显示在一个圆圈中。
相关文章:
- 使用Facebook登录时未填写个人资料
- 如何查找任何给定Facebook用户的LinkedIn个人资料
- Javascript-使用Facebook登录,显示用户's成功登录后的个人资料图片
- 如何使用JavaScript SDK更改Facebook个人资料图片并按时更改其背面
- Facebook共享仅对我的个人资料JavaScript API可见
- 钛加载Facebook个人资料图片集成不起作用
- 使用Selinium,Scrapy,Python检索用户个人资料的公共Facebook墙帖子
- 使用 Facebook API 获取和比较两个个人资料之间的常见喜欢
- Node.js:Facebook返回的是未定义而不是个人资料
- 在Facebook和Twitter上分享个人资料链接
- 如何在Meteor应用程序中显示facebook好友数量+个人资料图片
- 如何通过JavaScript SDK从Facebook获取封面照片和个人资料照片
- Javascript获取Facebook个人资料图像像素数据
- Facebook Graph API-在进行身份验证之前获取个人资料图片
- 访问Facebook个人资料图像时出现问题
- 我可以给这个人重新贴上标签吗?Facebook Open Graph中个人资料对象类型的名词
- 使用facebook用户名获取facebook个人资料图片
- 如何在facebook个人资料中分享和播放音频MP3文件?
- 使用facebook javascript sdk对某人的个人资料帖子或页面帖子或群组帖子发表评论
- 检索Facebook个人资料图片的URL