read_stream 不给来自用户图片
read_stream does not give from user picture
我在 javascript 中使用 public_profile、电子邮件、read_stream 权限从 facebook 获取订阅源,并且 return 的对象有一个发件人对象,其中包含 id 和名称来自用户 returns 但我需要图片也有人可以帮忙吗?
提前致谢。
FB.api("/me/feed",function (response) {
if (response && !response.error) {
var feed = response.data[0];
console.log(feed.from);
}
});
输出如下:
from: Object
id: "100000810224706"
name: "Raja Imran"
头像总是这样
https://graph.facebook.com/[userid]/picture
对于你的情况,这将是
https://graph.facebook.com/100000810224706/picture
如果您还请求图表中的图片,另一种方法是发出嵌套请求 api
像这样:
https;//graph.facebook.com/me/feed?fields=id,message,from{id,name,picture}
您可以在 /feed?fields=from{id,picture} 等查询字符串中显式请求图片字段
您可以通过分页获取其他记录,并且您的下一个和上一个链接存在于您的响应对象中,可以通过 console.log(response.paging);
访问
我在 javascript 中使用 public_profile、电子邮件、read_stream 权限从 facebook 获取订阅源,并且 return 的对象有一个发件人对象,其中包含 id 和名称来自用户 returns 但我需要图片也有人可以帮忙吗? 提前致谢。
FB.api("/me/feed",function (response) {
if (response && !response.error) {
var feed = response.data[0];
console.log(feed.from);
}
});
输出如下:
from: Object
id: "100000810224706"
name: "Raja Imran"
头像总是这样 https://graph.facebook.com/[userid]/picture
对于你的情况,这将是 https://graph.facebook.com/100000810224706/picture
如果您还请求图表中的图片,另一种方法是发出嵌套请求 api
像这样: https;//graph.facebook.com/me/feed?fields=id,message,from{id,name,picture}
您可以在 /feed?fields=from{id,picture} 等查询字符串中显式请求图片字段
您可以通过分页获取其他记录,并且您的下一个和上一个链接存在于您的响应对象中,可以通过 console.log(response.paging);