Facebook OAuth Xamarin ben Facebook, Google ve Twitter içine signin için formlar OAuth2 Xamarin kullanıyorum yeniden yönlendirme
Forms.
Android'de çalışıyor. Ancak iOS'ta, ekran sağ üst köşedeki eğirme etkinliği göstergesiyle donuyor. Aynı sorunu olan var mı?
Güncelleme: facebook geliştirici sitesinde kod
partial void UIButton15_TouchUpInside(UIButton sender)
{
// https://developers.facebook.com/apps/
var auth = new OAuth2Authenticator(
clientId: "ID",
scope: "",
authorizeUrl: new Uri("https://m.facebook.com/dialog/oauth/"),
redirectUrl: new Uri("http://www.facebook.com/connect/login_success.html"));
var ui = auth.GetUI();
auth.Completed += FacebookAuth_Completed;
PresentViewController(ui, true, null);
}
async void FacebookAuth_Completed(object sender, AuthenticatorCompletedEventArgs e)
{
if (e.IsAuthenticated)
{
var request = new OAuth2Request(
"GET",
new Uri("https://graph.facebook.com/me?fields=name,picture,cover,birthday"),
null,
e.Account);
var fbResponse = await request.GetResponseAsync();
var fbUser = JsonValue.Parse(fbResponse.GetResponseText());
var name = fbUser["name"];
var id = fbUser["id"];
var picture = fbUser["picture"]["data"]["url"];
var cover = fbUser["cover"]["source"];
}
DismissViewController(true, null);
}
aşağıda bulabilirsiniz: Facebook giriş eklentisi kullanarak
düzenlendi uygulaması. Yönlendirme URL'si eklendi: http://www.facebook.com/connect/login_success.html
Xamarin.Auth hangi sürümünü kullanıyorsunuz? Ayrıca günlük konsolunda görünen herhangi bir hata/mesaj var mı? – apineda
Yorumunuz için teşekkürler. Konsolda hata mesajı yok. 1.3.0 kullanıyorum. Ayrıca en son 1.3.2.7'yi denedi. –
Kimlik doğrulaması yapmak için kullandığınız kodu gösteren gönderiyi güncelleyin. – apineda