示例#1
0
        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();
        }
示例#2
0
        partial void QQLogin(NSObject sender)
        {
            AGCAuthCredential qqCredential = AGCQQAuthProvider.CredentialWithToken("TOKEN", "OPEN_ID");

            SignIn(qqCredential);
        }