private void Link(int row) { switch (row) { case 0: var weChatCredential = AGCWeiXinAuthProvider.CredentialWithToken("TOKEN", "OPEN_ID"); LinkAccount(weChatCredential); break; case 1: var qqCredential = AGCQQAuthProvider.CredentialWithToken("TOKEN", "OPEN_ID"); LinkAccount(qqCredential); break; case 2: var weiboCredential = AGCWeiboAuthProvider.CredentialWithToken("TOKEN", "UID"); LinkAccount(weiboCredential); break; case 3: xamarinAuthHelper.AuthorizeFacebook((credential) => { if (credential != null) { LinkAccount(credential); } }); break; case 4: xamarinAuthHelper.AuthorizeGoogle((credential) => { if (credential != null) { LinkAccount(credential); } }); break; case 5: xamarinAuthHelper.AuthorizeTwitter((credential) => { if (credential != null) { LinkAccount(credential); } }); break; case 6: LinkPhoneAccount(); break; case 7: LinkEmailAccount(); break; case 8: var appleCredential = AGCAppleIDAuthProvider.CredentialWithIdentityToken("IdentityToken", "RequestNonce"); LinkAccount(appleCredential); break; default: Console.WriteLine("none"); break; } owner.RefreshLinkState(); }
partial void WeChatLogin(NSObject sender) { AGCAuthCredential weChatCredential = AGCWeiXinAuthProvider.CredentialWithToken("TOKEN", "OPEN_ID"); SignIn(weChatCredential); }