Getting error "The remote name could not be resolved: 'api.twitter.com' " while twitting data from my website

631 views
Skip to first unread message

Richard Thomas

unread,
Aug 4, 2011, 2:26:22 AM8/4/11
to twitter-deve...@googlegroups.com
Hi.
I am using Twitterizer Aouth API.
 
Below is the code which I am using to connect to twitter from my website.
 

string

consumerKey = ConfigurationManager.AppSettings["consumerKey"];

string consumerSecret = ConfigurationManager.AppSettings["consumerSecret"];

if (System.Web.HttpContext.Current.Request.QueryString["oauth_token"] == null)

{

RequestToken =

OAuthUtility.GetRequestToken(consumerKey, consumerSecret, _currentURL);

System.Web.

HttpContext.Current.Response.Write("<script language=\"javascript\" type=\"text/javascript\">window.open('http://twitter.com/oauth/authorize?oauth_token=" + RequestToken.Token + "','_new','height=500,width=850,status=yes,resizable=yes');window.location.href=window.location.href;</script>");

}

 

Some times I get The remote name could not be resolved: 'api.twitter.com' exception when my website tries to connect to twitter using above code.

Can some one please help me in this?

Thanks,

Richard

Reply all
Reply to author
Forward
0 new messages