Problem publish Tweet

Nov 21, 2014 at 5:32 PM
Edited Nov 21, 2014 at 5:32 PM
Hi, I'm doing a testing of API with WPF, I try Publish a Tweet but don´t work, with my count:
    private async void PublicMyTweetAsync()
    {
        await Task.Run(() => PublishMyTweet());
    }

    private void PublishMyTweet()
    {
        var newTweet = Tweet.CreateTweet(MyTweet);
        var send = newTweet.Publish();
    }

    private void BtPublish_OnClick(object sender, RoutedEventArgs e)
    {
        PublicMyTweetAsync();
    }
If I check the user login, is correct but send always is false, I've already try without async call, and Tweet.PublishTweet(MyTweet) and TweetAsync.PublishTweet(MyTweet), if anyone can hepl, thanks.
Editor
Nov 24, 2014 at 4:56 PM
Edited Nov 24, 2014 at 4:56 PM
Try to get the last exception.
var ex = ExceptionHandler.GetLastException();
MessageBox.Show(string.Format("Error {0}: {1}", ex.StatusCode, ex.TwitterDescription));
imlokesh
Marked as answer by imlokesh on 11/24/2014 at 11:47 AM
Nov 24, 2014 at 5:44 PM
Edited Nov 24, 2014 at 6:01 PM
thanks a lot, I just try:
ex.StatusCode: error 401
ex.TwitterDescription: null
ex.TwitterExtensionInfo: "{\"request\":\"\\/1.1\\/statuses\\/update.json?status=hello&trim_user=true\",\"error\":\"Read-only application cannot POST.\"}"
ex.Weberror: {"Error in the remote server: (401) Not authorized."}
Nov 24, 2014 at 6:46 PM
sorry, but the problem I think that I don't select Read/Write permissions when I registered the app in Twitter, thank a lot, it is done.
Marked as answer by imlokesh on 11/24/2014 at 11:48 AM