如何通过php连接并向skype bot发送消息?

如何通过php连接并向skype bot发送消息?,php,sdk,bots,skype,skype-bots,Php,Sdk,Bots,Skype,Skype Bots,我想通过php创建一个简单的skype机器人,用于发送和接收信息 我厌倦了serch,但找不到任何真正的sdk或投诉的示例 我需要帮助后,得到令牌从 现在我有了我的令牌和sed realtime,并且总是将其与我的请求一起发送 但我还没准备好,有什么办法可以给你按摩吗? 什么是发送按摩参数? 什么是发送按摩贴子链接 我有一个错误: 由于发生内部服务器错误,无法显示该页 请帮助我,并发送完成或真正的sdk工作 我正在用git或google下载avry sdk找不到我的答案 谢谢 您好,这是我的bo

我想通过php创建一个简单的skype机器人,用于发送和接收信息 我厌倦了serch,但找不到任何真正的sdk或投诉的示例

我需要帮助后,得到令牌从

现在我有了我的令牌和sed realtime,并且总是将其与我的请求一起发送

但我还没准备好,有什么办法可以给你按摩吗? 什么是发送按摩参数? 什么是发送按摩贴子链接

我有一个错误: 由于发生内部服务器错误,无法显示该页

请帮助我,并发送完成或真正的sdk工作

我正在用git或google下载avry sdk找不到我的答案


谢谢

您好,这是我的bot脚本,有了它,我可以获取令牌并发送realtim 只是我不知道发送消息的下一步是什么,或者我的脚本有什么问题

我正在使用php lagn

$content = file_get_contents("php://input");
$update = json_decode($content,true);
$conversation=$update['conversation']['id'];
$user=$update['from']['id'];
file_put_contents('skype.txt',print_r($update,true));

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"https://login.microsoftonline.com/botframework.com/oauth2/v2.0/token");
curl_setopt($ch, CURLOPT_POST, 1);

$params ="grant_type=client_credentials&";
$params.="client_id=*****************************"; // My id 
$params.="client_secret=**************************"; // My Password
$params.="scope=https://api.botframework.com/.default";

curl_setopt($ch, CURLOPT_POSTFIELDS,$params);  //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$headers = array();
$headers = ['Content-Type: application/x-www-form-urlencoded'];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec ($ch);
if(curl_errno($ch)){
    var_dump(curl_error($ch));
}

$result=json_decode($result);
$access_token=$result->access_token; // now i have  access token


// what is after this step ? for send or reply msg in skype bot ?
// send request for send massage ?!
curl_setopt($ch, CURLOPT_URL,"https://skype.botframework.com/v3/conversations/".$conversation."/activities/".$user);
curl_setopt($ch, CURLOPT_POST, 1);
// what is parametr for send or reply msg ?
// what is requarement params ?
$params=array(
    'type' =>'message' , 
    'timestamp'=>$update['timestamp'],
    'from'=>array(
        'id' => $update['from']['id'], 
        'name' => $update['from']['name'], 
        ),
    'conversation'=>array(
        'id' => $update['conversation']['id'], 
        ),
    'recipient'=>array(
    'id' => $update['recipient']['id'], 
    'name' => $update['recipient']['name'], 
    ),  
    'text'=>'Wellcome to MWH',
    'replyToId' =>$user, 
);

$params=json_encode($params);
curl_setopt($ch, CURLOPT_POSTFIELDS,$params);  //Post Fields
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$headers = array();
$headers = ['Authorization: Bearer'.$access_token];
$headers = ['Content-Type: application/json; charset=utf-8'];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$res = curl_exec ($ch);
if(curl_errno($ch)){
    var_dump(curl_error($ch));
}
curl_close ($ch);
$res=json_decode($res);

// file_put_contents('skype.txt',print_r($res,true));
我使用这个链接

string(63)“SSL证书问题:无法获取本地颁发者证书”string(63)“SSL证书问题:无法获取本地颁发者证书”如果您通过php搜索发送消息到skype,请在邮递员上进行代码测试之前使用此示例,步骤2,1。获取令牌。2.发送消息。提示:$content=file\u get\u contents(“php://input"); , 你可以使用dialogflow集成,再见#freebrazil#lulalivre