c# - Does the Facebook .NET client SDK support universal apps / apps generated via AppStudio? -
I have created a universal app through Microsoft's AppStudio by following the 'Great Tutorial' () Attempted to add authentication.
When I run an app on my phone, I will never go to the Facebook login page, because the following line: The result is always the following exception: The source exception call is in the FacebookSessionClient.cs ( Facebook-client package ): It seems that this function is not implemented for the phone. I am still wondering how it is possible that the Trial, which refers to the exact code. > It has not been implemented for 8.1 yet, if you want to use Facebook authentication in 8.1, then you can use the following approach: In your app classroom: < Pre> I keep everything in one place for example purposes, it is better to exclude Faabi authentication logic. You can find this approach here wait App.FacebookSessionClient.LoginAsync ("user_about_me, read_stream");
System.NotImplementedException: Not implemented on Windows Security. Authentication Web. Web Authing Broker. Facebook on the authentic ASIC (WebAtification Option Option, Yuri Request Yuri, Uri Callback URI) Client.FacebookSation Client DOS4.MOVICE ()
Var results = WebAuthenticationBroker.AuthenticateAsync (option, startUri, endUri);
personal prong string RedirectUrl = "https: // www facebook.com/connect/login_success.html"; Private static readonly irDAOnLikulation & lt; String & gt; Permissions = new [] {"email", "offline_exact"}; Safe Override Zero (IActivatedEventArgs args) {base.OnActivated (args); Var ContinuationActive EventRugs = IContinuationActivatedEventArgs arguments; If (ContinuityActiveAvent errors == blank) return; Var webAuthenticationResult = ((WebAuthenticationBrokerContinuationEventArgs) Continuity expected events) .WebAuthenticationResult; If (webAuthenticationResult.ResponseStatus == WebAuthenticationStatus.Success) {var Facebook client = new FacebookClient (); Var result = facebookClient.ParseOAuthCallbackUrl (new URI (webAuthenticationResult.ResponseData)); If (! Result.IsSuccess) {// Process unsuccessful authentication} other {// successfully validating the var access Token = result.AccessToken process; }}} // Authentication method, when you click the Facebook authentication button Public Authentication and Continuity () {var loginUrl = GetLoginUrl (); WebAuthenticationBroker.AuthenticateAndContinue (login url, new ury (redirect url)); } Private URI GetLoginUrl () {var parameter = new dictionary & lt; String, Object & gt; (); Parameters ["client_id"] = "Your feesbook appeal ID"; Parameter ["redirect_uri"] = Redirect URL; Parameter ["response_type"] = "token"; Parameter ["display"] = "touch"; Parameter ["mobile"] = true; Parameter ["scope"] = string .join (",", permissions); Var facebookClient = New FacebookClient (); Return FacebookClient.GetLoginUrl (parameter); }
Comments
Post a Comment