Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Get photos from twitter in C#?

I'm trying to implement a feature in a .Net WPF application to automatically display photos from twitpic when users post them to my hashtag.

I'm using the Twitterizer2 API library, all the tweets coming from my search have their links as t.co links (I think this is from Twitter). I don't know how to parse these links to get the images to send them to the users.

like image 625
KamalSalem Avatar asked Nov 05 '22 13:11

KamalSalem


1 Answers

You can rely on the media entities data that is returned by Twitter.

You can see a sample and explaination that I posted a while back here: http://www.twitterizer.net/528/finding-urls-hashtags-and-mentions-using-entities/

The sample doesn't include it, but there is a newer TwitterMediaEntity class that gives information on images and videos.

like image 96
Ricky Smith Avatar answered Nov 15 '22 10:11

Ricky Smith