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 :)

Liked this question? Tell your friends about it

2 Answers

Order by
Oldest to Newest
Newest to Oldest
Votes
Staff

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.

One must do what one must do

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

<a href="" rel="nofollow" cl="http://100wpd.com/" class="comlink">100 W. P. D. </a>

Related Questions

Other people asked questions on similar topics, check out the answers they received:

Asked: Following using Yedda Twitter Library

How do you use the Yedda Wrapper to follow someone on twitter?

Asked: Examples of using the Yedda ...examples of using ...

do you have any examples of using the Yedda Twitter C# Library ? I would like to capture a status of a user and save it to an xml file Cheers Dave

Asked: Got an error : The remote server returned an error ...

hello, I am using Yedda twitter. When i implemented in my website then i got some Error "The remote server returned an error: (417) Expectation Failed." What i do to redim this error.

Ask a Question... We'll forward it to people who know

More Questions

Good sites for coupon codes?

www.edressit.com a dress website, you can find coupons to cut price. I hope you will like it!

Twitter GetFriends not working

The block normally gets its input from the Microsoft-developed Twitter block, or other blocks with similar output structure. The Twitter block supports the following operations: getLatestPosts, getFriends and getLatestUserPosts. CPB can handle the output of all three operations. These operations ...

Why was the Direct Message API dropped from the ...

Eran's answer Rocks! Thank you.

How do I disconnect Twitter from my AOL email account

You can get facebook fans from http://famecrowd.com/, they start delivering the fans within the same day and they even have a tracking area for clients.