Facebook的饲料对话框返回API错误code:191 [英] Facebook Feed Dialog Returns API Error Code: 191

查看:256
本文介绍了Facebook的饲料对话框返回API错误code:191的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Facebook应用程序,我会一直得到以下错误:

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

时出错。请稍后再试。
  API错误code:191
  API错误描述:指定的URL不属于应用程序
  错误消息:REDIRECT_URI不属于应用程序

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.

我只想养活通过按钮后我的code是

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);
  }

我的画布URL为http://mydomain.com/

我的安全帆布URL为https://mydomain.com/

我的制表URL为https://mydomain.com/tab.php

我的安全选项卡,网址为https://mydomain.com/tab.php

我与Facebook登录网站的URL网址为https://mydomain.com/

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/"

所以我做错了吗?

推荐答案

您需要在您的 VAR OBJ 阵列REDIRECT_URI。在饲料对话框文档 REDIRECT_URI 被指定为:

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

该URL重定向到用户点击对话框上的一个按钮后。 必需的,但大多数的SDK自动指定。

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

所以,必须指定它,它必须与您的应用程序的网站URL属于下一个URL。

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

这篇关于Facebook的饲料对话框返回API错误code:191的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆