コード例 #1
0
        public async Task <DebugTokenResult> DebugTokenAsync(string inputToken)
        {
            var debugTokenUrl = FacebookUrl.GetUrl(FacebookUrl.DebugTokenUrl, facebookApiVersion);

            return((await facebookClient.SendRequestAsync <DataWrapper <DebugTokenResult> >(
                        GraphApiRequestBuilder
                        .BuildRequestTo(debugTokenUrl)
                        .WithMethod(HttpMethod.Get)
                        .WithUrlPatameter("input_token", inputToken)
                        .WithAccessToken(await facebookClient.GetApplicationAccessTokenAsync())
                        .GetHttpRequestMessage())).Data);
        }
コード例 #2
0
        public async Task <IEnumerable <TestUserResult> > GetTestUsers()
        {
            var url = FacebookUrl.GetUrl(FacebookUrl.TestUserUrl, FacebookApiVersion.Version5, this.facebookClient.AppId);

            var request = GraphApiRequestBuilder
                          .BuildRequestTo(url)
                          .WithMethod(HttpMethod.Get)
                          .WithAccessToken(await facebookClient.GetApplicationAccessTokenAsync())
                          .GetHttpRequestMessage();

            return((await facebookClient.SendRequestAsync <DataWrapper <IEnumerable <TestUserResult> > >(request)).Data);
        }