Facebook Feed Dialog Returns API Error Code: 191

拥有回忆 提交于 2019-12-13 02:29:37

问题


In my Facebook App I'll always get the following error :

An error occurred. Please try again later. API Error Code: 191 API Error Description: The specified URL is not owned by the application Error Message: redirect_uri is not owned by the application.

I just want to feed a post via button my code is

  function postToFeed() {
    // calling the API ...
    var obj = {
      method: 'feed',
      link: 'https://mydomain.com/',
      picture: 'https://mydomain.com/img/feed.png',
      name: 'BLABLADialog',
      caption: 'UeberschriftBLABLA',
      description: 'DescriptionBLABLA',
      show_error: true
    };
    function callback(response) {
      document.getElementById('msg').innerHTML = "Post ID: " + response['post_id'];
    }
    FB.ui(obj, callback);
  }

my Canvas-URL is "http://mydomain.com/"
my Secure Canvas-URL is "https://mydomain.com/"
my Tab-URL is "https://mydomain.com/tab.php"
my Secure Tab-URL is "https://mydomain.com/tab.php"
my Website with Facebook Login SITE URL is "https://mydomain.com/"

so what I am doing wrong ?


回答1:


You need to include a redirect_uri in your var obj array. On the Feed Dialog documentation, redirect_uri is specified as:

The URL to redirect to after the user clicks a button on the dialog. Required, but automatically specified by most SDKs.

So it must be specified, and it must a URL that falls under the Site URL of your app.



来源:https://stackoverflow.com/questions/13308232/facebook-feed-dialog-returns-api-error-code-191

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!