Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/laravel/10.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Laravel 如何在网页中显示microsoft graph日历_Laravel_Microsoft Graph Api - Fatal编程技术网

Laravel 如何在网页中显示microsoft graph日历

Laravel 如何在网页中显示microsoft graph日历,laravel,microsoft-graph-api,Laravel,Microsoft Graph Api,如何在网页中显示graph.microsoft.com/v1.0/me/calendar中的xml 我花了两周的时间试图让API调用正常工作,现在它终于可以工作了,我希望它能让XML显示在我自己的网页上 ----GuzzleHttp api调用------ 试一试{ $calendar\u xml=$client->request('GET',”https://graph.microsoft.com/v1.0/me/calendar“,['headers'=>[“Authorization”=

如何在网页中显示graph.microsoft.com/v1.0/me/calendar中的xml

我花了两周的时间试图让API调用正常工作,现在它终于可以工作了,我希望它能让XML显示在我自己的网页上

----GuzzleHttp api调用------
试一试{
$calendar\u xml=$client->request('GET',”https://graph.microsoft.com/v1.0/me/calendar“,['headers'=>[“Authorization”=>“Bearer”。$access\u token->access\u token]]);
}catch(\GuzzleHttp\Exception\ClientException$e){
dd($e->getResponse()->getBody()->getContents());
}
$data=$calendar\u xml->getBody()->getContents()
------HTML刀片模板------
{{dd(simplexml_load_file($calendar_link))}

这个广泛的问题可以通过查看。它演示了如何在Laravel应用程序中显示从Microsoft Graph获得的日历信息


让我们知道该示例是否有用。

您遇到了什么错误?@farooq我添加了一张图片
------GuzzleHttp api call------


 try {
        $calendar_xml = $client->request('GET', "https://graph.microsoft.com/v1.0/me/calendar",['headers' => [ "Authorization" => "Bearer " . $access_token->access_token] ]);
    } catch(\GuzzleHttp\Exception\ClientException $e){
        dd($e->getResponse()->getBody()->getContents());
    }


$data = $calendar_xml->getBody()->getContents()



------HTML BLADE TEMPLATE------


<iframe srcdoc="{{$calendar_link}}" type="xml" width="100%" height="75%"></iframe>



{{dd(simplexml_load_file($calendar_link))}}