Search Tweet User

Feb 28, 2014 at 9:06 AM
Hi,

First of all thank you so much, your work is really great!

Secondly, is there a way using which i can search tweet creator by specifying tweet text?

For example: Undermentioned is a tweet

"Metal Version #Samsung #Galaxy S5 Expected To Launch In May http://t.co/SnQhIBsHJC"

and i want to find who actually posted this tweet?

Your help in this regard is highly appreciated.

-Asad
Coordinator
Feb 28, 2014 at 9:48 AM
Edited Feb 28, 2014 at 9:48 AM
Hi Asad,

Thank you for your feedback, I greatly appreciate it :)

If your question is 'how can I get the creator of a Tweet received from search?' then use the Creator field!
var tweets = Search.SearchTweets("galaxy s5");
foreach (var tweet in tweets)
{
        Console.WriteLine(tweet.Creator.Name);
}
If your question is 'how can I search for tweets from a specific user?' then use the following syntax : 'from:[USER_SCREEN_NAME]'
var tweetsFromUser = Search.SearchTweets("from:ladygaga");
foreach (var tweet in tweetsFromUser 
{
         Console.WriteLine(tweet.Creator.Name);
}
Let me know if this answer your question.
Linvi
Marked as answer by linvi on 3/15/2014 at 7:27 PM