未添加域,将白名单域Facebook Messenger扩展名 [英] Domains are not being added, Whitelist domains facebook messenger extension

查看:177
本文介绍了未添加域,将白名单域Facebook Messenger扩展名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直按照Facebook给出的说明尝试将我的域列入白名单,但没有任何帮助。

I've been trying to whitelist my domains following the instruction that is given by facebook but nothing is working.

我第一次尝试使用curl,响应为 {结果:成功} ,但是当我尝试列出列入白名单的域时,我得到的是 {data:[]}

I first tried with curl, the response is {result:"success"} but when I try to list the domains that are whitelisted I am getting {data:[]}

然后我尝试使用节点请求模块,如下所示:

Then I tried using node request module as follow:

request.post("https://graph.facebook.com/v2.6/me/messenger_profile?access_token=sfdlksdfu79r9429049824982342348sjdfsf", {
                "setting_type": "domain_whitelisting",
                "whitelisted_domains": ["https://mydomainw.com", "https://mydomainw.com/profile", "https://sfujyx.com/ofr", "mydomain1.com", "mydomain.com"],
                "domain_action_type": "add"}, function (err, res, body) {
                console.log("Whitelisting domain");
                if (!err) {
                    console.log(body);
                    console.log("Showing the list of whitelisted:");
                    request.get("https://graph.facebook.com/v2.6/me/messenger_profile?fields=whitelisted_domains&access_token=sfdlksdfu79r9429049824982342348sjdfsf", function (err, res, body) {
                        if (!err) {
                            console.log(body);
                        } else {
                            console.log(err);
                        }
                    });
                } else {
                    console.log(err);
                }
            });

仍然带来与curl相同的结果:

Still it bring the same result as curl :

当我使用Facebook Graph Api Explorer工具时,这是我的错误得到:

And when I use Facebook Graph Api Explorer tool, here is the error I am getting:

我真的卡住了,我不知道该怎么办,或者人们如何将信使扩展完全列入白名单。

I am really stuck, I don't know what should I do or how people exactly whitelist domain for messenger extension.

我在做什么错了?为什么不添加域?

What I am doing wrong? why isn't the domains being added?

我的项目在Google App Engine上。

My project is on Google App Engine.

推荐答案

问题是我使用的是App Access令牌而不是Page Access令牌,我不知道有什么区别。

The problem is I was using the App Access Token instead of the Page Access Token, I didn't know the difference.

这篇关于未添加域,将白名单域Facebook Messenger扩展名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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