0

我疯了,因为我无法解决这个问题。

请帮我。当我转到我创建的 php(这是 clixbox.net/fbupload.php)时,在获得用户权限后,它给了我这个错误。致命错误:未捕获的 OAuthException:验证应用程序时出错。申请已被删除。在第 1271 行的 /home/clixcube/public_html/clixbox.net/library/base_facebook.php 中抛出

我的 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);

关于如何解决这个问题的任何想法?

4

1 回答 1

0

考虑检查您的应用程序列表以查看应用程序是否仍然存在

developer.facebook.com/apps

如果是,请考虑提交错误 developers.facebook.com/bugs

于 2013-06-12T13:47:38.173 回答