我在messenger机器人中使用信使扩展程序,因此我需要将我的域名列入白名单。我使用此命令在白名单中添加我的域名:
curl -X POST -H "Content-Type: application/json" -d '{
"setting_type" : "domain_whitelisting",
"whitelisted_domains" : ["https://example.com"],
"domain_action_type": "add"
}' "https://graph.facebook.com/v2.6/me/thread_settings?access_token=myPageAccessToken"
它返回:
{"result":"Successfully updated whitelisted domains"}
然后使用以下命令返回whitelisted_domains:
curl -i -X GET "https://graph.facebook.com/v2.6/me/thread_settings?fields=whitelisted_domains&access_token=myPageAccessToken"
它返回200个状态代码和包含我的域的数组:
{"data":[{"whitelisted_domains":["https:\/\/example.com\/"],"id":"425660424468922"}]}
但我仍然收到同样的错误:The URL provided is not whitelisted for messenger extensions
任何帮助将不胜感激