我疯了,因为我无法解决这个问题。
请帮帮我。当我转到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);
关于如何解决这个问题的任何想法?
答案 0 :(得分:0)
考虑检查应用程序列表以查看应用程序是否仍在那里
developers.facebook.com/apps
如果是,请考虑提交bug.facebook.com/bugs