This project has moved. For the latest updates, please go here.

Updating status not "creating" hashtag?

Aug 26, 2012 at 7:14 PM

Hi All

I am new to the world of linq2twitter so forgive my ignorance! 

Anyway, I've created a c# console app that takes details from our helpdesk system and tweets the title, ref, and service area to our departments twitter account. However, when the tweet is sent, the reference number (below) should be a hashtag, not just hash ref number. 

FP #88513 CBL has been deferred in error [CBL]

Does this library support this or have I done something wrong in code? Below is the method I have to sent the tweet. Before this, I get the details I require via sqldatareader and then convert all fields to a string after a bit of validation...

any ideas?

 private static void sendTweet(string msg)
            var auth = new SingleUserAuthorizer
                Credentials = new InMemoryCredentials
                    ConsumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"],
                    ConsumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"],
                    OAuthToken = ConfigurationManager.AppSettings["twitterOAuthToken"],
                    AccessToken = ConfigurationManager.AppSettings["twitterAccessToken"]
            using (var twitterConnection = new TwitterContext(auth, "", ""))
                    var tweet = twitterConnection.UpdateStatus(msg);
                    Console.WriteLine("Status returned: " +
                        "(" + tweet.StatusID + ")" +
                        tweet.Text + "\n");
                catch(Exception e)

Aug 26, 2012 at 7:34 PM


If I understand correctly, you're wanting "#88513" to appear as a hyperlink (and a hash tag entity) in Twitter? I tried this by running it through LINQ to Twitter and noticed that it didn't appear as a hyperlink hash tag.  Then I copied the text into a tweet via the Twitter Web site and observed the same thing. Further experiments on the Twitter Web site indicate that Twitter will only treat text as a hash tag if the # is followed by an alpha character but not by a number.


Aug 27, 2012 at 9:40 AM

Hi Joe

Firstly, thanks for the really quick response. Much appreciated! 

I've tried what you recommended, and changed the format of the hashtag to include other non numerics and it now works as expected:

#FP88448 Can you see why the jobs are sitting in the Bucket but Friday 7th Sept has no work in it. [Opti-Time]


Thanks very much!