Facebook Graph API不会给我图片数据 [英] Facebook Graph API will not give me picture data

查看:107
本文介绍了Facebook Graph API不会给我图片数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用PHP 5.2.11和新的Facebook图形代码...

Using PHP 5.2.11 and the new facebook graph code...

如果我打电话

$ facebook-> api(/ me);

$facebook->api("/me");

我得到了正确的回应:

array
  'id' => string '10700210' (length=8)
  'name' => string 'Brandon Renfrow' (length=19)
  'first_name' => string 'Brandon' (length=7)
  'middle_name' => string '✫' (length=3)
  'last_name' => string 'Renfrow' (length=7)
  'link' => string 'http://www.facebook.com/brenfrow' (length=32)
  'about' => string 'Spiritual birthday: 1/22/2005' (length=29)
  ...
  ...

但是如果我打电话

$facebook->api("/me/picture");

我总是收到以下回复:

null

有谁知道为什么这是? >

Does anyone know why this is?

推荐答案

我想我发现最好的答案是调用 http://graph.facebook.com/USER_ID?fields=picture 获取图片网址。它的坏,他们不会将这样的东西记录在他们的API上,特别是当它的明显这是为许多人打破了。

Well I guess the best answer I've found is to call http://graph.facebook.com/USER_ID?fields=picture to get the picture URL. Its to bad they don't document things like this on their API especially when its obvious this is broken for so many people.

这篇关于Facebook Graph API不会给我图片数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆