void HandleAccountRemoved(Account account) { string username = account.GetProperty("Twitter.Username"); if (!String.IsNullOrEmpty(username)) { RemoveTwitterAccount(account, username); } }
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); } }