Ошибка при попытке открыть диалоговое окно канала

Я получаю следующую ошибку при попытке открыть диалоговое окно канала ..

Произошла ошибка. Пожалуйста, попробуйте позже.

Нужно ли, чтобы пользователи разрешали приложению размещать сообщения у себя на стене? Я думал, что это не так, потому что это не будет тем, что автоматически публикуется на стене пользователя самим приложением. Кроме того, я получаю сообщение об ошибке, когда использую свою учетную запись администратора.

Вот мой код:

<script>
  window.fbAsyncInit = function() {
    FB.init({
  appId      : 'xxxxxxxxxxxxxxx', // App ID
  channelURL : 'http://localhost/foods/channel.html', // Channel File
  status     : true, // check login status
  cookie     : true, // enable cookies to allow the server to access the session
  oauth      : true, // enable OAuth 2.0
  xfbml      : true  // parse XFBML
});

// Additional initialization code here
  };

  // Load the SDK Asynchronously
  (function(d){
 var js, id = 'facebook-jssdk'; if (d.getElementById(id)) {return;}
 js = d.createElement('script'); js.id = id; js.async = true;
 js.src = "//connect.facebook.net/en_US/all.js";
 d.getElementsByTagName('head')[0].appendChild(js);
}(document));


function postToFeed() {

    // calling the API ...
    var obj = {
      method: 'feed',
      link: 'https://developers.facebook.com/docs/reference/dialogs/',
      picture: 'http://fbrell.com/f8.jpg',
      name: 'Facebook Dialogs',
      caption: 'Reference Documentation',
      description: 'Using Dialogs to interact with users.'
    };

    function callback(response) {
      document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
    }

    FB.ui(obj, callback);
  }
</script>

<a href="javascript:void();" onclick="postToFeed();"><img src="images/share.gif" /></a>
8
задан Somnath Muluk 17 November 2015 в 11:07
поделиться