How can i know the userid of the tweeted user

Mar 13, 2015 at 12:09 PM
Hi,
i am new to twitter stuff. I wanted to know that is there any possibility to know the tweeted user userid from a tweet.

Thanks
Viswadattu
Coordinator
Mar 13, 2015 at 12:41 PM
Hi,

You can even do better. Here is some code starting from a tweet id.
var tweet = Tweet.GetTweet(2983293);
var userWhoPublished = tweet.Creator;
var id = userWhoPublished.Id;
var username = userWhoPublished.Name;
Regards,
Linvi
Marked as answer by linvi on 3/13/2015 at 5:52 AM
Mar 13, 2015 at 1:41 PM
Thanks linvi got it
Mar 13, 2015 at 1:43 PM
Edited Mar 13, 2015 at 1:43 PM
Just wanted to ask one more thing can we filter tweets containing #hashTags?

Thanks in advance

Viswadattu
Coordinator
Mar 13, 2015 at 1:51 PM
Edited Mar 13, 2015 at 1:52 PM
Yes, but there are many ways to do this. But if you want to check if a tweet contains a hashtag you can do the following.
if (tweet.Hashtags != null && tweet.Hashtags.Any())
{
    // This tweet has a hashtag!
}
Linvi
Marked as answer by linvi on 3/13/2015 at 6:14 AM
Mar 13, 2015 at 1:54 PM
Great