Twitter Sign In API


#1

Hi I’ve my app registered on twitter with valid consumer keys,secret and all.

I’ve implemented Twitter Login API in my web app. It works fine on my Localhost i.e user is able to login using his Twitter A/c to my app.

But when I upload my web app on our server domain, and click on Twitter Login button… It could not find consumer key and secrets(also i guess but only consumer key is getting null)which I’m mentionaing in web.config file of my app…

I tried with registering no of apps… but for each app the same problem occurs i.e it (twitter login api functioanlity) works fine on localhost but fails on server domain

I’ve this code on my Twitter login button:

Session["Login"] = "T"; HttpCookie cookie = new HttpCookie("SpecialKey", "NEWACC"); Response.Cookies.Add(cookie);

var consumerKey = ConfigurationManager.AppSettings[“consumerKey”];
var consumerSecret = ConfigurationManager.AppSettings[“consumerSecret”];

if (Request.QueryString[“oauth_token”] == null)
{
// Step 1: Get Request Token
OAuthTokenResponse RequestToken = OAuthUtility.GetRequestToken(consumerKey, consumerSecret, “http://cn.iconnectgroup.com/Profile.aspx”);
//OAuthTokenResponse RequestToken = OAuthUtility.GetRequestToken(consumerKey, consumerSecret, “http://localhost:7583/Profile.aspx”);
// Step 2: Redirect User to Requested Token
Response.Redirect(“http://twitter.com/oauth/authorize?oauth_token=” + RequestToken.Token);
}

Why this is happening any suggetions…


#2

The IPL match between Rcb and Csk today at Ranchi appars to be fixed. Dhoni getting out to an unusual shot. Then when Bangalore was batting during the last three overs, david hussey was asked to bowl instead of regular bowlers like badree or sharma.Thus Rcb was helped. Spectators are made fools.