我在尝试使用信使平台上的php白名单列出我的应用程序域时出现此错误
{“error”:{“message”:“(#100)参数setting_type是必需的”,“”类型“:”OAuthException“,”code“:100,”fbtrace_id“:”H4 + VMmlq3Ab“}}
这里是json
$domain_white = '{
"whitelisted_domains":[
"https://aadb-3120.herokuapp.com"
]
}';
`
和我的卷曲
function curl($input)
{
global $accessToken;
global $input;
$ch = curl_init('https://graph.facebook.com/v2.6/me/messages?access_token='.$accessToken);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $input);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
$output = curl_exec($ch);
curl_close($ch);
error_log($output);
}
答案 0 :(得分:0)
您错过了setting_type
,这是必需的:
{
"setting_type": "domain_whitelisting",
"whitelisted_domains": [
"https://aadb-3120.herokuapp.com"
],
"domain_action_type": "add"
}