Problem with Tweeting

Mar 2, 2015 at 1:26 PM
Edited Mar 2, 2015 at 1:28 PM
I am getting a tweet Id of -1 so I assume it is not working, but when I check with the ExceptionHandler I get a null result
and yes that twitter account has read and write premissions
TwitterCredentials.ExecuteOperationWithCredentials(credentials, () =>
                    {
                        byte[] file = FileToByteArray(@"C:\wus\temp\" + aImage.FileName);
                        var tweet = Tweet.CreateTweetWithMedia(TwMessage, file);
                        //var tweet = Tweet.CreateTweet(TwMessage + " " + aImage.FilePath);
                        var ex = ExceptionHandler.GetLastException();

                        Core.UpdateStatus(false, "Twitter.Process.Create", "Message Tweeted " + TwMessage);
                        if (tweet.Id > 0)
                        {
                            sReturn = "File Name " + aImage.FileName + " Send on Tweet " + tweet.Id.ToString();
                        }
                        else
                        {
                            sReturn = string.Format("ERROR: {0}: {1}", ex.StatusCode, ex.TwitterDescription);
                        }
                    });
Mar 2, 2015 at 1:33 PM
sorry forgot the publish statement fixed
Marked as answer by Lbloom206 on 3/2/2015 at 5:33 AM