[英]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.