c# 3.0 - Could not authenticate with OAuth -
i using tweetsharp , trying play twitter application. @ present simple console application.
i have searched in net , found articles of them stating after august 16th 2010, basic authentication twitter no longer applicable. instead oauth has come place.
henceforth, have gone twitter apps , created 1 me.(since it's desktop application, choose application type client , not browser.)
these various information got
consumer key : nxdgjunklu65cw38ea1rt consumer secret :joomsrgpthct9hfjgqotpxsczwi5k8zkipoc1ytfo request token url : https://twitter.com/oauth/request_token access token url : https://twitter.com/oauth/access_token authorize url: https://twitter.com/oauth/authorize
as basic step have planned that, write/post tweet wall.
henceforth, made following(some code has been taken web using reference)
string consumerkey = "nxdgjunklu65cw38ea1rt"; string consumersecret = "joomsrgpthct9hfjgqotpxsczwi5k8zkipoc1ytfo"; fluenttwitter.setclientinfo(new twitterclientinfo { consumerkey = consumerkey, consumersecret = consumersecret }); //gets token var requesttoken = fluenttwitter.createrequest().authentication.getrequesttoken().request().astoken(); var twitter = fluenttwitter.createrequest() .authenticatewith( consumerkey ,consumersecret, requesttoken.token, requesttoken.tokensecret) .statuses().update("i writing first tweets").asxml(); var response = twitter.request(); var status = response.asstatus();
but response is
<?xml version="1.0" encoding="utf-8"?> <hash> <error>could not authenticate oauth.</error> <request>/1/statuses/update.xml</request> </hash>
i trying long time understand problem in vain.
i need help.
thanks
getting request token first step of oauth process. need request token, authorize token, , trade if access token. use access token send tweet.
see link flowchart of full oauth process.
Comments
Post a Comment