示例#1
0
 void HandleAccountRemoved(Account account)
 {
     string username = account.GetProperty("Twitter.Username");
     if (!String.IsNullOrEmpty(username)) {
         RemoveTwitterAccount(account, username);
     }
 }
示例#2
0
        void HandleAccountAdded(Account account)
        {
            if (!String.IsNullOrEmpty(account.GetProperty("Twitter.Username")) &&
                !String.IsNullOrEmpty(account.GetProperty("Twitter.Password")))
            {
                string username = account.GetProperty("Twitter.Username");
                string password = account.GetProperty("Twitter.Password");
                account.GetFeature<UserWebIdentities>().SetIdentity("twitter", username);

                AddTwitterAccount(account, username, password);
            }
        }