나는 이것을 풀 수 없기 때문에 나는 미쳐 간다.atal 오류 : 알려지지 않은 OAuthException : 응용 프로그램 유효성 검사 오류. 신청서가 삭제되었습니다.
도와주세요. 내가 goto 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);
이 문제를 해결하는 방법에 대한 아이디어가 있으십니까?
앱이 있습니다. 검토를 위해 개발자에게 앱을 제출해야합니까? 이것이 오류의 원인입니까? – user2477755
@ user2477755 버그를 제출 제출 : – phwd
그냥 해냈어. 고맙습니다 – user2477755