简体   繁体   English

如何通过facebook社交插件获取已注册我网站的用户的个人资料图片

[英]How can i get the profile picture of a user who have registered my website via the facebook social plugin

I have a registration plugin embeded via an iframe on my website, The registration plugin works fine , I am also able to get the unique user_id of each user by using the following line of code in the signed_request file which can be located here 我通过iframe内嵌在我的网站注册的插件,该插件的注册工作得很好, 我也能够通过使用下面的代码行中可位于signed_request文件,以获得每个用户的独特USER_ID 这里

The line of code i use to get the user_id is: $response["user_id"]; 我用来获取user_id的代码行是: $response["user_id"];

Now that i have a unique id of each user, i want a way by which i can get the link to the profile image of that user, i know i can get the thumbnail of the profile picutre using open graph, 现在我有一个每个用户的唯一ID,我想要一种方式,我可以获得该用户的个人资料图像的链接, 我知道我可以使用开放图形获取配置文件picutre的缩略图

But i am looking for a way by which i can get the link to the complete or the original profile picture, not the thumbnail. 但我正在寻找一种方法,通过它我可以获得完整或原始个人资料图片的链接,而不是缩略图。

Is there a way this can be done? 有没有办法可以做到这一点? Using open graph or something like that? 使用开放图形或类似的东西?

You need user_photos permissions first. 您首先需要user_photos权限。 Then something like this should do it: 那么这样的事情应该这样做:

SELECT cover_object_id FROM album WHERE owner=me() and type='profile'

Substitute me() with the user you are querying for. 用您要查询的用户替换me()

It returns the photo object that you can then use to pull the full version from. 它返回照片对象,然后您可以使用它从中提取完整版本。

使用相同signed_request中的access_token对/user_id/?fields=picture进行API调用

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何通过注册社交插件获取在我的网站上注册的用户的用户ID - How to get user id of users who register on my website through registration social plugin 通过PHP获取Facebook个人资料图片(用户ID)/图片 - Get Facebook profile picture via PHP (user-id)/picture 如何通过Facebook SDK获取用户个人资料图片(最新方法?) - How can I get a users profile picture via the facebook sdk (latest way?) 我如何获取facebook用户ID以获取个人资料图片? - How Can I get the facebook user id in order to get profile picture? 如何在Facebook上获取用户的个人资料图片 - How to get user's profile picture on Facebook 如何使用PHP保存用户的Facebook个人资料图片到我的域/网站数据 - How to save save user's facebook profile picture to my domain/website data using php 如何从Facebook或instagram中提取某个用户的个人资料图片并将其上传到我们网站上该用户的个人资料页面? - How to extract the profile picture of some user from facebook or instagram and upload it to profile page of that user at our website?? 如何在 php 中获取 Facebook 用户的个人资料图片 - How to get a Facebook user's profile picture in php 我应该怎么获得的Facebook用户的好友列表,并在PHP他们的个人资料图片的使用图形API? - How should i get Facebook user friend list and their profile picture's using Graph API in PHP? 如何使用PHP访问Facebook用户的个人资料图片? - How do I access the profile picture of a facebook user in PHP?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM