For now, Twitter is down since the last couple of hours On Tue, Jun 15, 2010 at 10:33 AM, thomen <penny.lane.m...@gmail.com> wrote:
> Hi Guys, > I've got an asp.net usercontrol to display twitter feeds. > > It requests the xml using this url and then parsing it: "http:// > twitter.com/statuses/user_timeline.xml? > screen_name=INSERTUSERNAMEHERE&count=INSERTPOSTCOUNTHERE"; > > ie "http://twitter.com/statuses/user_timeline.xml? > screen_name=ladygaga&count=5"; > > public List<TwitterStatus> GetStatusUpdates(string screenName, int > count) > { > string url = String.Format(StatusesUserTimeline, screenName, count); > //this becomes something like: > http://twitter.com/statuses/user_timeline.xml?screen_name=ladygaga&count=5 > string xml = FetchXmlFromUrl(url); > > return CreateStatusObjectsFromXml(xml, count); > } > > protected virtual string FetchXmlFromUrl(string url) > { > using (WebClient client = new WebClient()) > using (Stream s = client.OpenRead(url)) > using (StreamReader sr = new StreamReader(s)) > { > return sr.ReadToEnd(); > } > } > > etc etc (if you need more code I can provide) > > Just starting over the weekend on most of our sites we're now getting > the response: The remote server returned an error: (502) Bad Gateway > when trying to fetch the xml from the url > > just wondering what would cause the 502??? > > the usercontrol is cached so we don't exceed the request limit.. > -- Thanks & Regards Rajiv Verma Bangalore E-Mail: rajiv....@gmail.com Ph: +91-92430-12766 Go Green, Use minimum natural resources!