我試圖創建一個頁面一張專輯,但是我碰到下面的錯誤;添加相冊頁使用API(PHP)
[15-Sep-2011 22:38:14] PHP致命錯誤:未捕獲的OAuthException:(#100)C:\ inetpub \ wwwroot \ Diveengine \ v3 \ facebook \ base_facebook中引發的相冊所有者ID無效ID爲 。上線988 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'];
我已經能夠爲我的配置文件中創建一個相冊,但是我想這爲頁。
謝謝終於摸索出如何讓頁面的訪問令牌。 – Ben
這告訴我,「訪問令牌才能請求此資源」 :(這個什麼新的想法? – JosFabre