how to tweet an image,url,text at a time using asp.net c# -
how tweet image, url, text @ time on twitter means single tweet in load event using c#. chances on kind off issues ?
protected void page_load(object sender, eventargs e) { string sans = ""; string tosh = ""; var oauth_consumer_key = "8888888888888888888888888888"; var oauth_consumer_secret = "11111111111111111111111111111"; if (request["oauth_token"] == null) { oauthtokenresponse reqtoken = oauthutility.getrequesttoken( oauth_consumer_key, oauth_consumer_secret, request.url.absoluteuri); response.redirect(string.format("http://twitter.com/oauth/authorize?oauth_token={0}", reqtoken.token)); } else { string requesttoken = request["oauth_token"].tostring(); string pin = request["oauth_verifier"].tostring(); var tokens = oauthutility.getaccesstoken( oauth_consumer_key, oauth_consumer_secret, requesttoken, pin); oauthtokens accesstoken = new oauthtokens() { accesstoken = tokens.token, accesstokensecret = tokens.tokensecret, consumerkey = oauth_consumer_key, consumersecret = oauth_consumer_secret }; twitterresponse<twitterstatus> response = twitterstatus.update(accesstoken,tosh, new statusupdateoptions() { usessl = true, apibaseaddress = "http://api.twitter.com/1.1/" }); if (response.result == requestresult.success) { response.write("we did it!"); } else { response.write("it's bad."); } } }
Comments
Post a Comment