Xamarin.Forms の勉強の過程で、バックエンドとして Azure Mobile App を使う
チュートリアル的なやつをやっているのですが、IDプロバイダー認証のところでつまづいてます。
https://docs.microsoft.com/ja-jp/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-users
これによると、
LoginAsyncメソッドの使い方で、
C#
1user = await TodoItemManager.DefaultManager.CurrentClient.LoginAsync(this, 2 MobileServiceAuthenticationProvider.Facebook, "{url_scheme_of_your_app}");
となっていますが、
Microsoft.Azure.Mobile.Client の現在のバージョンv4.0.2 には、このようなシグネーチャはなくて、
LoginAsync(MobileServiceAuthenticationProvider, JObject)
となっています。
そこで、
C#
1(前略).LoginAsync(MobileServiceAuthenticationProvider.Twitter, null);
とすると、
System.ArgumentNullException: Value cannot be null.
が発生し、tokenパラメータはnullはダメということらしいので、
C#
1(前略).LoginAsync(MobileServiceAuthenticationProvider.Twitter, new JObject());
とか、
C#
1(前略).LoginAsync(MobileServiceAuthenticationProvider.Twitter, 2 JObject.Parse(@"{ ""access_token"":"""" }"));
とかやってみたところ、
Microsoft.WindowsAzure.MobileServices.MobileServiceInvalidOperationException: Bad Request
が発生し、'access_token'フィールドは必須だとか言われます。(ReasonPhrase "'access_token' field is required.")
日本語ドキュメントが古いのだろうと思い、英語版をあたってみましたが、
https://docs.microsoft.com/en-us/azure/app-service-mobile/app-service-mobile-xamarin-forms-get-started-users
まったく同じことが書いてあるだけです。
これはオフィシャルなドキュメントだと思うので、これ以上何を調べたらいいのかわからず、
途方に暮れています。
補足情報(FW/ツールのバージョンなど)
Visual studio 2017 community と
Azure無料試用版サブスクリプション使用
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/02/24 00:21