Laravel 如何在网页中显示microsoft graph日历
如何在网页中显示graph.microsoft.com/v1.0/me/calendar中的xml 我花了两周的时间试图让API调用正常工作,现在它终于可以工作了,我希望它能让XML显示在我自己的网页上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”=
----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))}}