응용 프로그램을 대신하여 사용자 벽에 게시하려고합니다.대상 사용자가이 작업을 승인하지 않았습니다. facebook graph api
내가하고있는 일이 여기에있다.
먼저 나는 페이스 북에서 사용자 access_token은 연결 얻을하고 난 다음 코드를 사용하여 친구의 벽에 게시 할 때 이제 다음 호출
https://graph.facebook.com/oauth/access_token?
client_id=APP_ID&
client_secret=APP_SECRET&
grant_type=fb_exchange_token&
fb_exchange_token=EXISTING_ACCESS_TOKEN
를 사용하여 extended access token
를 리시버.
var params = {};
params['message'] = 'Check out this new gag I\'ve posted about you surely it will piss you off :p';
params['name'] = 'Gagsterz';
params['description'] = 'If you also want to have fun on gagster join in now.';
params['link'] = 'http://localhost/php/backup/View/Profile.php';
params['picture'] = thumbpath;
params['caption'] = 'Caption';
FB.api('/'+victimid+'/feed?access_token="ACCESS_TOKEN", 'post', params, function(response) {
if (!response || response.error) {
var json = $.parseJSON(response.error);
alert(json.code);
alert(JSON.stringify(response.error));
} else {
alert('Published to stream - you might want to delete it now!');
}
});
다음과 같은 오류가 발생합니다.
the target user has not authorized this action facebook graph api
with code 200.
나는 권한 publish_stream을 나는 권한을 되 돌린 후 다시에 권한을 부여 로그인하고 나는 동안이 권한을 복용하고 permission.But 로그인 창 post on behalf
을 요청하여 테스트했습니다 처음으로 액세스 토큰을 검색합니다. 확장 액세스 토큰에 대해 다시 권한을 받아야합니까? 그렇다면 어떻게해야합니까?
나는 권한'publish_stream'을 나는 권한을 되 돌린 후, 나는 액세스를 검색하고있는 동안거야 지금 내가 권한을 복용하고 그것에 권한을 부여 로그인하여 테스트했습니다 처음으로 토큰. 확장 액세스 토큰에 대해 다시 권한을 받아야합니까? – Mj1992