Abbreviations.com Convert.net Definitions.net Quotes.net Synonyms.net USZip.net References.net
Bookmark & Share
 
Synonyms.net
Search for Synonyms:     
Browse Alphabetically:
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z #
 random synonym 
Personalize Yedda, (And make Danny Happy)
People ask & answer about almost everything. Tell us what you're interested in... So we can personalize Yedda especially for you
I'm interested in:

C# and Yedda's Twitter api... Can not get login code...

I am programming a C# application using yedda for twitter intergration and here is a small look at my code to see if the user's login username and password are correct.

 private void btnSave_Click(object sender, EventArgs e)
        {
            if (txtUserName.Text.Trim() == "")
            {
                lblSatus.Text = "Please enter Twitter Username";
                txtUserName.Focus();
                return;
            }
            if (txtPassword.Text.Trim() == "")
            {
                lblSatus.Text = "Please enter Twitter Password";
                txtPassword.Focus();
                return;
            }

            lblSatus.Text = "";
           
            //Check for Username and Password Validation
            Twitter objTwitter = new Twitter();
            XmlDocument Updates = default(XmlDocument);

            //Try the login
            try
            {
                Updates = objTwitter.GetUserTimelineAsXML(txtUserName.Text.Trim(), txtPassword.Text.Trim(), null, Yedda.Twitter.OutputFormatType.XML);
                Properties.Settings.Default.UserName = txtUserName.Text;
                Properties.Settings.Default.Password = txtPassword.Text;
            }
            catch (Exception)
            {
                MessageBox.Show("Failed to Login to Twitter with the values supplied. Please check your login details.");
                txtUserName.Focus();
                return;
            }

        }

 

I am not sure what is wrong with it. But everytime I hit the save button it always gives me an error, even when the password and username is perfectly correct.... all help is appreciated :)


Share Send to a friend Watch Report
 
 

2 Posted Answers
Order by

 
207 helpful answers

They're coming to take me away, Ha-haaa!

Advanced .NET Debugging Blog

My personal blog

Can you send the error you are getting? This can help in figuring out what the problem actually is.

Also, do not the following comment on the Yedda Dev Blog. It seems Twitter changed something on their servers which causes some issue with .NET. The comment specifies a line of code that if used in your app before calling Twitter can fix the problem.

Posted 2009-05-26T07:58:51Z
Helpful?(2)
Rated as Best Answer
 

Thank You Eran. The problem was i didn't that that small... itttyyy bittyy line of code placed before i connected. :) Thank you :)

Posted 2009-05-26T16:12:09Z

Sign in to participate

Got an answer for Ryanb58? Would you like to comment on the posted answers, or vote for the one which you think is the best?

Sign up for a free account, or sign in (if you're already a member).

Feed - Subscribe to changes to this Q&A Blog
ADVERTISEMENT
Synonyms.net Q&A is powered by Yedda an AOL Company
Copyright © 2006-2009, Yedda Inc. and respective copyright owners
Home |  Add New Abbreviation |  Your List |  Tools |  Become an Editor |  Tell a Friend |  Links |  Awards |  Testimonials |  Press |  News |  APIs new! |  About
Copyright ©2004-2007 STANDS4 LLC. All rights reserved.  Terms of Use  |  Privacy Policy  |  Contact Us