This article describes how to use the Twitter API and show all tweets on a page using Windows Phone 7.Getting StartedCreating a Windows Phone Application:
void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { if (e.Error != null) return;
XDocument xdoc = XDocument.Parse(e.Result); List<ItemCollection> contentList = new List<ItemCollection>(); foreach (XElement item in xdoc.Elements("statuses").Elements("status")) { ItemCollection content = new ItemCollection(); content.UserName = item.Element("user").Element("screen_name").Value; content.Message = item.Element("text").Value; content.ImageSource = item.Element("user").Element("profile_image_url").Value; contentList.Add(content); } listBox1.Visibility = Visibility.Visible; listBox1.ItemsSource = contentList.ToList(); }Build and run to see the result.Image 2.Image 3.We are done here with this sample. If you have questions or comments drop me a line in the comments section.
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: