Hier ist der Code, der oauth authentication 1.0 verwendet.
Login with twitter using oauth authentication in asp.net and get access token, screen name and userid.
OAuthHelper oauthhelper = new OAuthHelper();
string requestToken = oauthhelper.GetRequestToken();
if (string.IsNullOrEmpty(oauthhelper.oauth_error))
Response.Redirect(oauthhelper.GetAuthorizeUrl(requestToken));
else
Response.Write(oauthhelper.oauth_error);
Return URL.
if (Request.QueryString["oauth_token"] != null && Request.QueryString["oauth_verifier"]!=null)
{
string oauth_token = Request.QueryString["oauth_token"];
string oauth_verifier = Request.QueryString["oauth_verifier"];
OAuthHelper oauthhelper = new OAuthHelper();
oauthhelper.GetUserTwAccessToken(oauth_token, oauth_verifier);
if (string.IsNullOrEmpty(oauthhelper.oauth_error))
{
Session["twtoken"] = oauthhelper.oauth_access_token;
Session["twsecret"] = oauthhelper.oauth_access_token_secret;
Session["twuserid"] = oauthhelper.user_id;
Session["twname"] = oauthhelper.screen_name;
Response.Write("<b>AccessToken=</b>" + oauthhelper.oauth_access_token);
Response.Write("<br /><b>Access Secret=</b>" + oauthhelper.oauth_access_token_secret);
Response.Write("<br /><b>Screen Name=</b>" + oauthhelper.screen_name);
Response.Write("<br /><b>Twitter User ID=</b>" + oauthhelper.user_id);
}
else
Response.Write(oauthhelper.oauth_error);
}
Get oAuthHelper und oAuthUttilityKlassen und verstehen, wie es Login with twitter using oauth authentication in asp.net and get access token, screen name and userid.
funktioniert Wie kann ich diese hier erfassen? – fixmycode