2014-11-26 4 views
0

I tried to post on facebook wall using below code-페이스 북의 벽에 게시 자바 스크립트

function facebook_login() { 
    FB.login(function (response) { 
     if (response.authResponse) { 
      FB.api('/me/feed', 'post', { message: 'Hello, world!' }, function(status) { 
       if (!status || status.error) { 
        console.log('Error occured'); 
       } else { 
        console.log('Post ID: ' + status.id); 
       } 
      }); 
      FB.api('/me', function(response) { 
       var user_profile = JSON.stringify(response); 
      }); 
     } 
    },{scope: 'email,publish_actions,user_birthday,offline_access'}); 
} 
를 통해

But It throw me this error:

code: 200

message: "(#200) The user hasn't authorized the application to perform this action"

type: "OAuthException"

I do not understand what I did wrong.

답변

0

offline_access 년 이후 사용되지 않으며, 당신이 어떻게 든 그것을 필요로하지는. 글을 올리려면 publish_actions 만 있으면되고 어떤 사용자에게도 적용되기 전에 review 프로세스를 거쳐야합니다. 권한 팝업에서 publish_actions 권한을 요청하고 앱 관리자/개발자 만 시도하십시오.

이 오류 메시지는 사용자가 publish_actions으로 올바르게 인증하지 못했음을 의미합니다.

+0

"publish_actions"권한을 얻으려면 검토를 위해 앱을 보내야합니까? – mizan3008

+0

앱에서 역할이있는 사용자가 아닌 모든 사용자에 대해 작동하려면 '예'를 선택하고 '예'를 선택하십시오. – luschn

관련 문제