0

I have a very simple application that is trying to get a user and then retrieve the user timeline for that user

TwitterCredentials.SetCredentials("cred1","cred2", "cred3","cred4");
var user = Tweetinvi.User.GetUserFromScreenName("ladygaga");
var timelineTweets = user.GetUserTimeline();

This works fine on my local machine. However, when I deploy this to the server the user is null and I get a Object reference not set to an instance of an object. Looking at the network traffic there is no call going out to the twitter api.

Any ideas what could be causing this issue?

MightyAtom
  • 331
  • 4
  • 24

1 Answers1

1

When you receive a null object from the Tweetinvi API it means that the request to the Twitter API failed for any reason.

Please provide more information related with this exception by using the ExceptionHandler

// Get Last Exception
var exceptionDetails = ExceptionHandler.GetLastException();

// Let you manage all the exceptions from Tweetinvi
ExceptionHandler.SwallowWebExceptions = false;

// Log Exceptions
ExceptionHandler.WebExceptionReceived += (sender, args) => { var exceptionReceived = args.Value; };
user2465083
  • 595
  • 3
  • 12