根据Facebook图形API,我们可以使用此示例请求用户个人资料图片(示例):
https://graph.facebook.com/1489686594/picture
我们不需要任何令牌,因为它是公共信息.
但上一个链接的真实图片网址是:http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs356.snc4/41721_1489686594_527_q.jpg
如果您在浏览器上键入第一个链接,它会将您重定向到第二个链接.
有没有办法通过知道第一个链接获得PHP的完整URL(第二个链接)?
我有一个函数从URL获取图像以将其存储在数据库中,但它只有在获得完整的图像URL时才有效.
谢谢
我要求此页面使用关键字获取事件
"conference":https://graph.facebook.com/search?q=conference&type=event
Run Code Online (Sandbox Code Playgroud)
这很好用.
问题是返回的分页:
"paging": {
"previous":"https://graph.facebook.com/search?q=conference&type=event&limit=25&since=2010-12-18T17%3A00%3A00%2B0000",
"next":"https://graph.facebook.com/search?q=conference&type=event&limit=25&until=2010-11-04T16%3A29%3A59%2B0000"
}
Run Code Online (Sandbox Code Playgroud)
似乎有更多的事件与"会议",但请求这2个分页URLS不返回任何数据.
这很奇怪,因为它对于任何请求的关键字都是相同的,并且Facebook API返回的分页URL似乎总是返回空数据.
有谁知道这是什么问题?
谢谢