2013-06-12 45 views
0

因爲我解決不了這個問題,所以我瘋了。atal錯誤:未捕獲OAuthException:驗證應用程序時出錯。應用程序已被刪除。

請幫幫我。當我得到的PHP(這是clixbox.net/fbupload.php)我創建,獲得用戶權限後,它給了我這個錯誤。 致命錯誤:未捕獲OAuthException:驗證應用程序時出錯。應用程序已被刪除。拋出/home/clixcube/public_html/clixbox.net/library/base_facebook.php上線1271

我fbupload.php文件是這樣的

<?php 
require_once 'library/facebook.php'; 
$facebook = new Facebook(array(
'this is where i put my app id' => $app_id, 
'my app secret' => $app_secret, 
'fileUpload' => true 
)); 


//It can be found at https://developers.facebook.com/tools/access_token/ 
$access_token = 

'this is where i put my token'; 

$params = array('access_token' => $access_token); 

//The id of the fanpage 
$fanpage = '232241216922182'; 

//The id of the album 
$album_id ='281594988653471'; 

//Replace Wa33D94 with your Facebook ID 
$accounts = $facebook->api('/Wa33D94/accounts', 'GET', $params); 

foreach($accounts['data'] as $account) { 
if($account['id'] == $fanpage || $account['name'] == $fanpage){ 
    $fanpage_token = $account['access_token']; 
} 
} 


$valid_files = array('image/jpeg', 'image/png', 'image/gif'); 

if(isset($_FILES) && !empty($_FILES)){ 
if(!in_array($_FILES['pic']['type'], $valid_files)){ 
    echo 'Only jpg, png and gif image types are supported!'; 
}else{ 
    #Upload photo here 
    $img = realpath($_FILES["pic"]["tmp_name"]); 

    $args = array(
    'message' => 'This photo was uploaded via Clixbox.net', 
    'image' => '@' . $img, 
    'aid' => $album_id, 
    'no_story' => 1, 
    'access_token' => $fanpage_token 
); 

    $photo = $facebook->api($album_id . '/photos', 'post', $args); 
    if(is_array($photo) && !empty($photo['id'])){ 
    echo '<p><a target="_blank" href="http://www.facebook.com/photo.php?fbid='.$photo['id'].'">Click here to see this photo on 

Facebook.</a></p>'; 
    } 
} 
} 

?> 
<html> 
<head> 
<title>Upload a picture to facebook</title> 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
</head> 

<body> 
<!-- Form for uploading the photo --> 
<div class="main"> 
    <p>Select a photo to upload on Facebook Fan Page</p> 
    <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data"> 
    <p>Select the image: <input type="file" name="pic" /></p> 
    <p><input class="post_but" type="submit" value="Upload to my album" /></p> 
    </form> 
</div> 
</body> 
</html> 

而且base_facebook.php線(1271)是這

$e = new FacebookApiException($result); 

關於如何解決這個問題的任何想法?

回答

0

考慮您的應用程序列表檢查,看看是否應用程序仍然存在

developers.facebook.com/apps

如果是,可以考慮提交錯誤developers.facebook.com/bugs

+0

該應用程序在那裏。 我們是否需要將應用程序提交給開發人員進行審查? 這是錯誤出現的原因嗎? – user2477755

+0

@ user2477755提交bug一個 – phwd

+0

現在就做。謝謝 – user2477755

相關問題