2012-12-06 57 views
2

我正在使用facebook php sdk 3.2 我使用url“https://graph.facebook.com/user_id/albums?access_token=token”来获取所有相册中的所有相册用户,但对于一些用户来说,这是给空白结果像使用图表api获取所有facebook相册的列表

{ 
    "data": [ 
    ] 
} 

为什么会出现这种情况,和我如何得到一个用户的所有专辑?

我使用的代码是

$this->facebook=new Facebook(array(
          'appId' => $appId, 
          'secret' => $appSecret, 
          'cookie' => true 
         )); 

if(is_null($this->facebook->getUser()) || $this->facebook->getUser()==0) 
    $this->askForLogin(); 

$this->accessToken = $this->facebook->getAccessToken(); 

$feedURL = "https://graph.facebook.com/".$this->facebook->getUser()."/albums?access_token=".$this->accessToken; 

$albumData = file_get_contents($feedURL); 
+0

如果没有专辑 – Rose

+0

,那么数据将为空,但我在该帐户中有很多专辑。 – user1085195

+1

是否所有用户都授予您'user_photos'权限? – Igy

回答

0

这是该用户的设置它封锁了所有的应用程序,查看他的照片的问题。现在解决了这个问题

相关问题