我一直试图将我的域名列入白名单,该域名是由facebook给出的指令,但没有任何工作。域名未被添加,白名单域名facebook messenger扩展
我第一次与卷曲尝试,响应{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);
}
});
不过它带来的结果相同卷曲:
当我使用Facebook的图形API资源管理器工具,这里是我得到的错误:
我很坚持,我不知道我该怎么做还是怎么的人传令扩展正是白名单域名。
我做错了什么?为什么不添加域?
我的项目位于Google App Engine上。
我想你正在使用错误的API路径。它应该是“/ me/messenger_profile”。 –
{ “error”:{ “message”:“不支持的post请求。带有'me'标识的对象不存在,由于缺少权限而无法加载,或者不支持此操作。 https://developers.facebook.com/docs/graph-api”, “类型”: “GraphMethodException”, “代码”:100, “fbtrace_id”: “BDenwqcm3BD” }} 是我得到的回应当我把/ me/messenger_profile @MichealVu – aidonsnous
你得到了上面的消息,因为你使用错误的access_token。你应该尝试获得页面访问令牌。 –