我试图允许用户将项目添加到其他用户的日历中。用户登录并获取令牌如下
const AUTHORIZE_ENDPOINT = '/oauth2/v2.0/authorize';
const TOKEN_ENDPOINT = '/oauth2/v2.0/token';
const SCOPES = 'profile openid email User.Read Calendars.ReadWrite Calendars.Read Calendars.Read.Shared Calendars.ReadWrite Calendars.ReadWrite.Shared';
$graph = new Graph();
$graph->setAccessToken($token);
$response = $graph->createRequest("GET", "/me")->setReturnType(Model\User::class)->execute();
登录用户可以使用添加到他们自己的日历
$request = $graph->createRequest("post", '/me/events');
$request->attachBody($data);
$response = $request->execute();
但是,当我尝试添加到另一个用户时
$request = $graph->createRequest("post", '/anotheruser/events');
$request->attachBody($data);
$response = $request->execute();
我收到消息
Resource not found for the segment
已完成管理员身份验证同意,所以一切都应该没问题。
有什么建议么?