I tried to post on facebook wall using below code-сообщение на стене Facebook с помощью Javascript
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.
Должен ли я отправлять свое приложение для просмотра, чтобы получить разрешение «publish_actions»? – mizan3008
, если вы хотите, чтобы он работал для всех пользователей, а не только для пользователей с ролью в приложении, то да – luschn