Kris
Kris

Reputation: 575

Facebook Feed Dialog Returns API Error Code: 191

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 ?

Upvotes: 1

Views: 2176

Answers (1)

Matthew Johnston
Matthew Johnston

Reputation: 4439

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.

Upvotes: 2

Related Questions