Hi,
I am using Twitterizer OAuth API to share data to twitter through my website.
Below is the code which I am using for twitter connection.
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 am getting exception The remote name could not be resolved: ‘api.twitter.com’ when my application tries to execute above code.
Can some one please help me in this problem?
Thanks in advance.!
Richard