0

API 错误代码:Facebook UI 中共享对话框的 191

我一直在努力让 FB.ui 工作。不幸的是,我不断收到错误消息:

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.

如果我在https://developers.facebook.com/中访问我的应用程序基本信息

我没有看到任何问题,一切看起来都很好:

App ID: 471513259597047
Display Name: Calculator
Site URL: http://www.calculator.com

我填写了所需的所有内容,但仍然收到 191 错误。顺便说一下,我正在 localhost 中测试这个。

    <html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:fb="https://www.facebook.com/2008/fbml">
  <head>
    <title>My Feed Dialog Page</title>
  </head>
  <body>
    <div id='fb-root'></div>
    <script src='http://connect.facebook.net/en_US/all.js'></script>
    <p><a onclick='postToFeed(); return false;'>Post to Feed</a></p>
    <p id='msg'></p>

    <script> 
      FB.init({appId: "471513259597047", status: true, cookie: true});

      function postToFeed() {

        // calling the API ...
        var obj = {
          method: 'feed',
          redirect_uri: 'http://www.calculator.com',
          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 people.'
        };

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

        FB.ui(obj, callback);
      }

    </script>
  </body>
</html>
4

1 回答 1

0

我认为,您在 developers.facebook.com 上创建 facebook 应用程序时指定的 URL 与代码中指定的 URL 之间存在一些不匹配,请交叉检查。

于 2013-10-28T12:37:17.200 回答