Windows Forms application C# | Sending Tweet

Posted by Andrew Craswell on Stack Overflow See other posts from Stack Overflow or by Andrew Craswell
Published on 2011-01-08T21:48:51Z Indexed on 2011/01/08 21:54 UTC
Read the original article Hit count: 223

Filed under:
|
|
|
|

I've been able to get my Twitter web app working just fine, but I've recently decided to add Tweeting functionality from a Windows Form, but I'm having no luck sending tweets. No errors are thrown or anything. Mind looking over my code?

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using TweetSharp;

namespace TwitterAdvirtiser
{
    public partial class Form1 : Form
    {
        private string cKey = "xxx";
        private string cSecret = "xxx";
        private string oToken = "xxx";
        private string aToken = "xxx";



        public Form1()
        {
            InitializeComponent();
            OnStart();
        }

        private void OnStart()
        {
            //Authenticate with Twitter
            TwitterService service = new TwitterService(cKey, cSecret);
            service.AuthenticateWith(oToken, aToken);
            service.SendTweet("testing");
        }
    }
}

It seems like I'm authenticating just fine, I can walk through debug mode and see all my details in the TwitterUser structure, and yet my tweets never show up on my feed. Whats up?

By the way, I'm using Visual Studios 2010, and .NET 4.0. I have verified that the oToken and aToken strings have my developer tokens.

© Stack Overflow or respective owner

Related posts about c#

Related posts about winforms