【发布时间】:2011-09-15 13:19:54
【问题描述】:
我正在尝试为页面创建相册,但出现以下错误;
[2011 年 9 月 15 日 22:38:14] PHP 致命错误:未捕获的 OAuthException:(#100) 专辑所有者的 ID 无效 在第 988 行的 C:\inetpub\wwwroot\Diveengine\v3\facebook\base_facebook.php 中抛出
代码如下
require 'facebook.php';
$facebook = new Facebook(array(
'appId' => "aaaaaaaaaaaa",
'secret' => "aaaaaaaaaaaaaaaaaaaaa",
));
$facebook->setAccessToken("aaaaaaaaaaaaaaaaaaaaa");
$me = $facebook->api('/me');
//At the time of writing it is necessary to enable upload support in the Facebook SDK, you do this with the line:
$facebook->setFileUploadSupport(true);
//Create an album
$album_details = array(
'message'=> 'test album',
'name'=> 'Test Album'
);
$create_album = $facebook->api('/pageid/albums', 'post', $album_details);
// I have the page ID
//Get album ID of the album you've just created
$album_uid = $create_album['id'];
我已经能够为我的个人资料创建一个相册,但是我想要这个页面。
【问题讨论】: