不添加域名,白名单域名facebook messenger扩展名

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

我第一次尝试curl,响应是{result:"success"}但是当我尝试列出被列入白名单的域时,我得到{data:[]}

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

 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相同的结果:

代码结果的屏幕截图

而当我使用FacebookgraphicsAPI的资源pipe理器工具,这是我得到的错误:

图形Api工具,将域名列入白名单

我真的陷入了困境,我不知道我该怎么做,或者人们是如何将域名完全列入白名单的。

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

我的项目在Google App Engine上。

你的域名:“ https://mydomainw.com ”是一个无效的域名。

请求应该返回:

 { "error": { "message": "(#100) whitelisted_domains[0] should represent a valid URL", "type": "OAuthException", "code": 100, "fbtrace_id": "Aq3AVaNVJU9" } } 

其实我之前没有使用“setting_type”。 这是我如何注册域名:

 var request = require("request"); var options = { method: 'POST', url: 'https://graph.facebook.com/v2.6/me/messenger_profile', qs: { access_token: 'my_page_token' }, headers: { 'content-type': 'application/json' }, body: { whitelisted_domains: [ 'https://mydomainw.com', 'https://ijuugwivbc.localtunnel.me' ] }, json: true }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); 

问题是我使用应用程序访问令牌,而不是页访问令牌,我不知道区别。