Argument null exception on Search.SearchTweets()

Mar 15, 2014 at 3:30 PM
I'm new to this and am getting an argument null exception on SerachTweets.
Even the User.GetLoggedUser() and other functions seem to fail.


var applicationCredentials = CredentialsCreator.GenerateApplicationCredentials("key", "secret");
var url = CredentialsCreator.GetAuthorizationURL(applicationCredentials);

var newCredentials = CredentialsCreator.GetCredentialsFromVerifierCode(captchastr, applicationCredentials);

var tweetsFromUser = Search.SearchTweets("from:username");
Here are the API calls

POST : https://api.twitter.com/oauth/request_token
Header OAuth oauth_callback="oob",oauth_consumer_key="key",oauth_nonce="8299367",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1394893294",oauth_version="1.0",oauth_signature="44444444444%2FVlRSZ4imJ0Ma9UE%3D"
Go on : https://api.twitter.com/oauth/authorize?oauth_token=TOKENGENERATED

Enter the captch :

POST : https://api.twitter.com/oauth/access_token
Header OAuth oauth_consumer_key="key",oauth_nonce="2552105",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1394893324",oauth_token="token",oauth_verifier="0250712",oauth_version="1.0",oauth_signature="%blah%3D"

Access Token = ################
Access Token Secret = ##############


GET : https://api.twitter.com/1.1/search/tweets.json?q=from%3Aladygaga&result_type=Mixed
Header OAuth oauth_consumer_key="KEY",oauth_nonce="8347215",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1394893330",oauth_token="BLAHBLAH%20",oauth_version="1.0",oauth_signature="blahF%2Blah%3D"
A first chance exception of type 'System.ArgumentNullException' occurred in mscorlib.dll
Coordinator
Mar 15, 2014 at 9:49 PM
Hi Ahki,

I can see that you are missing something in your code :
TwitterCredentials.Credentials = newCredentials;
Please try this before
var tweetsFromUser = Search.SearchTweets("from:username"); 
And let me know what happens.
Linvi
Marked as answer by linvi on 3/15/2014 at 7:24 PM
Mar 16, 2014 at 2:39 AM
HI Linvi,

Haaa... that makes sense. Thanks a bunch dear!!

It is working now.

Regards
Akhi