Boas alguem ja tentou ou consegui se ligar ao Wit.ai via php com cUrl
Coloquei no titulo OAuth2 mas foi erro meu.....
$header = array('Authorization: Bearer 6R********');
$ch = curl_init("https://api.wit.ai/message?v=20160311&q=turn the light");
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$response = curl_exec($ch);
print_r($response);
Não obtenho resposta
Mas se for a unix e correr o comando
curl -H 'Authorization: Bearer 6R**************' 'https://api.wit.ai/message?v=20160311&q=turn the light'
Recebo o json de resposta
Obrigado por qualquer ajuda que possam dar
Coloquei no titulo OAuth2 mas foi erro meu.....
$header = array('Authorization: Bearer 6R********');
$ch = curl_init("https://api.wit.ai/message?v=20160311&q=turn the light");
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
$response = curl_exec($ch);
print_r($response);
Não obtenho resposta
Mas se for a unix e correr o comando
curl -H 'Authorization: Bearer 6R**************' 'https://api.wit.ai/message?v=20160311&q=turn the light'
Recebo o json de resposta
Obrigado por qualquer ajuda que possam dar