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>

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

More Questions

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 ...

Good sites for coupon codes?

Now there are thousand of coupons store available online and provide coupons and coupon codes for online shopping, But i know a coupons store having 100% working discount coupons that is www.couponsbag.in .

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.