twitterCtx.UpdateStatus() property doesn't exist?

Jan 28, 2015 at 1:51 PM
Hi,

I am trying to understand how to post an status update with LinkToTwitter 2.7.1
My attempt is like below. But there is no property found for .UpdateStatus. I also need to use 2.7.1 as I have framework 4.0. The latest release use framework 4.5 which is not possible for me to use.

var auth = new LinqToTwitter.SingleUserAuthorizer
        {
            Credentials = new LinqToTwitter.SingleUserInMemoryCredentials
            {
                ConsumerKey = "abc",
                ConsumerSecret = "abc",
                TwitterAccessToken = "324234234-abc",
                TwitterAccessTokenSecret = "abc"
            }
        };

        var twitterCtx = new LinqToTwitter.TwitterContext(auth);

        twitterCtx.UpdateStatus = "Hello World";       
(.UpdateStatus is not found but only .Status is found)
Coordinator
Jan 28, 2015 at 4:04 PM
Hi,

UpdateStatus is a method, not a property.
            var status =
                " Testing LINQ to Twitter update status on \n " +
                DateTime.Now.ToString() + " #linqtotwitter ";

            Console.WriteLine("\nStatus being sent: \n\n\"{0}\"", status);
            Console.WriteLine("\nPress any key to post tweet...\n");
            Console.ReadKey();

            var tweet = twitterCtx.UpdateStatus(status);

            Console.WriteLine(
                "Status returned: " +
                "(" + tweet.StatusID + ")" +
                "[" + tweet.User.ID + "]" +
                tweet.User.Name + ", " +
                tweet.Text + ", " +
                tweet.CreatedAt + "\n");
@JoeMayo
Jan 28, 2015 at 9:18 PM
Thanks JoeMayo for your answer,

But when I use this code, I cant find UpdateStatus in twitterCtx like this:

twitterCtx.UpdateStatus

I can only find:

twitterCtx.Update


I am not sure what I am missing out?

Regards
Andreas
Coordinator
Feb 1, 2015 at 8:36 PM
Do you have a using declaration for LINQ to Twitter? Try adding this to the top of your file:
using LinqToTwitter;
@JoeMayo