I need help in uploading images directly to twitter in Windows Phone 7.
I am done with oauth flow of twitter and can also could update tweets but I have not been able to upload image to twitter using wp7?
I need help in uploading images directly to twitter in Windows Phone 7.
I am done with oauth flow of twitter and can also could update tweets but I have not been able to upload image to twitter using wp7?
I have worked out a solution for this, by using the Hammock.WindowsPhone.Mango library. (TweetSharp internally uses Hammock library for oAuth and other functionalities, but I have never used TweetSharp or Twitterizer)
I have installed the latest version of Hammock from Nuget
And then the following code is used for photo upload to Twitter:
Here, photoName is the name of the image selected ( "e.OriginalFileName") photoStream is the "e.ChosenPhoto" from the PhotoChooserTask
and the 4th parameter for .AddFile() should be taken care (I have not considered other formats while doing this sample, you have to take care in your apps)
I hope this helps!!
LINQ to Twitter supports WP7 and has a TweetWithMedia method that works like this:
Joe