SlideShare a Scribd company logo
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
仕事
個人活動
http://bit.ly/metrotokyo4
http://tech.tanaka733.net
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
http://okazuki.hatenablog.com/entry/2014/04/21/003008
WebAuthenticationBroker.GetCurrentApplicationCallbackUri()
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
protected async override void OnActivated(IActivatedEventArgs e)
{
//前半略
var continuationEventArgs = e as IContinuationActivatedEventArgs;
if (continuationEventArgs != null)
{
var page = rootFrame.Content as TwitterPage;
if (page != null)
{
page.ContinueWebAuthentication(e
as WebAuthenticationBrokerContinuationEventArgs);
}
}
Window.Current.Activate();
}
//パラメーターを生成
var options = new List<KeyValuePair<string, string>>(capacity: 1)
{
new KeyValuePair<string,string>("oauth_callback", callbackUri)
};
var headerParams = OAuthUtility.BuildBasicParameters("vPJVb79KWRIaTFAZ3ri5KY0cF",
"p1XJIHjnkvIF7zscQDOL1La4KpKfPNRTuvwIzSHDwtkv5YwtYe",
"https://api.twitter.com/oauth/access_token",
System.Net.Http.HttpMethod.Post,
new RequestToken(token, ""),
options);
var header = headerParams.Select(p => p.Key + "=" + p.Value.Wrap("¥"")).ToString(",");
//AccessTokenを取得
var client = new HttpClient();
var request = new HttpRequestMessage(
HttpMethod.Post,
"https://api.twitter.com/oauth/access_token")
{
Content = new FormUrlEncodedContent
(new List<KeyValuePair<string, string>>(capacity: 1)
{
new KeyValuePair<string,string>("oauth_verifier", verifier)
})};
request.Headers.Authorization = new AuthenticationHeaderValue("OAuth", header);
var response = await client.SendAsync(request);
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth
using
OneMoreThing…
http://www.microsoft.com/ja-jp/events/developer/default.aspx
20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth

More Related Content

PPTX
AngularJS $http Interceptors (Explanation and Examples)
PDF
Angular promises and http
PDF
Angular server-side communication
DOCX
Spring 3.0
PPTX
Spine.js
PDF
Intro to node.js web apps
PDF
clara-rules
PDF
Entities on Node.JS
AngularJS $http Interceptors (Explanation and Examples)
Angular promises and http
Angular server-side communication
Spring 3.0
Spine.js
Intro to node.js web apps
clara-rules
Entities on Node.JS

What's hot (20)

PPTX
Angular 1.x vs. Angular 2.x
PPTX
Beyond Profilers: Tracing Node.js Transactions
PPTX
AngularJS Routing
PDF
Laravel, the right way - PHPConference 2016
PDF
"Service Worker: Let Your Web App Feel Like a Native "
PDF
Why Redux-Observable?
PDF
What happens in laravel 4 bootstraping
PDF
Laravel the right way
PDF
Asynchronous programming patterns in Perl
KEY
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
PDF
進化するCoreML
PDF
Javascript call ObjC
PPTX
Avoiding callback hell in Node js using promises
PDF
React native-firebase startup-mtup
 
PDF
Node.js: Continuation-Local-Storage and the Magic of AsyncListener
DOCX
Cursor Demo App
PDF
«От экспериментов с инфраструктурой до внедрения в продакшен»​
PDF
Rntb20200805
 
PPTX
Template syntax in Angular 2.0
PDF
Redux. From twitter hype to production
Angular 1.x vs. Angular 2.x
Beyond Profilers: Tracing Node.js Transactions
AngularJS Routing
Laravel, the right way - PHPConference 2016
"Service Worker: Let Your Web App Feel Like a Native "
Why Redux-Observable?
What happens in laravel 4 bootstraping
Laravel the right way
Asynchronous programming patterns in Perl
The Return of JavaScript: 3 Open-Source Projects that are driving JavaScript'...
進化するCoreML
Javascript call ObjC
Avoiding callback hell in Node js using promises
React native-firebase startup-mtup
 
Node.js: Continuation-Local-Storage and the Magic of AsyncListener
Cursor Demo App
«От экспериментов с инфраструктурой до внедрения в продакшен»​
Rntb20200805
 
Template syntax in Angular 2.0
Redux. From twitter hype to production
Ad

Viewers also liked (9)

PDF
20140419 xamarin zumo
PPTX
13016 n分で作るtype scriptでnodejs
PPTX
120517 cf tour_london
PDF
20140322 mvvm crossforwindowsstoreapps-pdf
PPTX
20140322 mvvm crossforwindowsstoreapps
PPTX
110216 jawsug lt by t_tanaka_wap
PPTX
120225 qp lt
PPTX
110820 tech aid_lt_kinect_pub
PDF
Augmented reality communication that provides a new experience value
20140419 xamarin zumo
13016 n分で作るtype scriptでnodejs
120517 cf tour_london
20140322 mvvm crossforwindowsstoreapps-pdf
20140322 mvvm crossforwindowsstoreapps
110216 jawsug lt by t_tanaka_wap
120225 qp lt
110820 tech aid_lt_kinect_pub
Augmented reality communication that provides a new experience value
Ad

More from Takayoshi Tanaka (20)

PDF
deep dive distributed tracing
PPTX
202202 open telemetry .net handson
PPTX
202109-New_Relic-for-csharp-engineers
PDF
20210129 azure webapplogging
PDF
20201127 .NET 5
PPTX
Unity(再)入門
PPTX
最近のQ#について
PDF
SRENEXT 2020 [B5] New RelicのSREに学ぶ SREのためのNew Relic活用法
PDF
20191024 Get Start gRPC with ASP.NET
PDF
New Relicで始める、.NET Applications on AWSのObservability
PPTX
C#エンジニアのためのdocker kubernetesハンズオン (再)
PPTX
20190806 Q# Measurements
PPTX
C#エンジニアのためのdocker kubernetesハンズオン
PDF
20190604 Containerized MagicOnion on kubernetes with Observability with New R...
PDF
.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能
PDF
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
PDF
Try! Visual Studio 209 git feature
PDF
Q#基礎 ver1.1
PDF
(過去バージョン) Q#基礎 ver1.0
PDF
ゼロから始めるQ#
deep dive distributed tracing
202202 open telemetry .net handson
202109-New_Relic-for-csharp-engineers
20210129 azure webapplogging
20201127 .NET 5
Unity(再)入門
最近のQ#について
SRENEXT 2020 [B5] New RelicのSREに学ぶ SREのためのNew Relic活用法
20191024 Get Start gRPC with ASP.NET
New Relicで始める、.NET Applications on AWSのObservability
C#エンジニアのためのdocker kubernetesハンズオン (再)
20190806 Q# Measurements
C#エンジニアのためのdocker kubernetesハンズオン
20190604 Containerized MagicOnion on kubernetes with Observability with New R...
.NET Core向けコンテナおよびデバッグ関連のVisual Studio 2019の機能
.NET Core向けコンテナおよびデバッグ関連のVisual Studioの新機能
Try! Visual Studio 209 git feature
Q#基礎 ver1.1
(過去バージョン) Q#基礎 ver1.0
ゼロから始めるQ#

Recently uploaded (20)

PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Approach and Philosophy of On baking technology
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Spectral efficient network and resource selection model in 5G networks
Approach and Philosophy of On baking technology
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Per capita expenditure prediction using model stacking based on satellite ima...
Advanced methodologies resolving dimensionality complications for autism neur...
The AUB Centre for AI in Media Proposal.docx
MIND Revenue Release Quarter 2 2025 Press Release
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Review of recent advances in non-invasive hemoglobin estimation
Network Security Unit 5.pdf for BCA BBA.
Chapter 3 Spatial Domain Image Processing.pdf
cuic standard and advanced reporting.pdf
Spectroscopy.pptx food analysis technology
20250228 LYD VKU AI Blended-Learning.pptx

20140510 Twitter Authentication by WebAuthentictionBroker in Windows Phone 8.1 with AsyncOAuth