extract digg data by digg api

Posted by vamsivanka on Stack Overflow See other posts from Stack Overflow or by vamsivanka
Published on 2010-06-17T20:00:44Z Indexed on 2010/06/17 20:03 UTC
Read the original article Hit count: 362

Filed under:
|
|

I am trying to extract digg data for a user using this url

"http://services.digg.com/user/vamsivanka/diggs?count=25&appkey=34asd56asdf789as87df65s4fas6"

and the web response is throwing an error "The remote server returned an error: (403) Forbidden."

Please let me know.

public static XmlTextReader CreateWebRequest(string url)
        {
            HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
            webRequest.UserAgent = ".NET Framework digg Test Client";
            webRequest.Credentials = System.Net.CredentialCache.DefaultCredentials;
            webRequest.Accept = "text/xml";
            HttpWebResponse webResponse = (HttpWebResponse)webRequest.GetResponse();
            System.IO.Stream responseStream = webResponse.GetResponseStream();
            XmlTextReader reader = new XmlTextReader(responseStream);
            return reader;
        }

© Stack Overflow or respective owner

Related posts about data

Related posts about extract