c# - Creating a RestRequest for Twitter using OAuth1.0 -
i'm trying create valid restrequest taking advantage of get statuses/user_timeline.json provided twitter api.
i have dev business relationship , consumer key/secret , accesstoken/tokensecret
_restclient.timeout = 60000; _restclient.baseurl = "http://api.twitter.com/1.1" _restclient.authenticator = oauth1authenticator.forprotectedresource(ckey, csecret, at, atsecret) var request = new restrequest("statuses/user_timeline.json?screen_name=default", method.get) var response = _restclient.execute(request)
to request receive response
{"errors":[{"message":"could not authenticate you","code":32}]}
i suspect i'm missing step, since many resources i've found reach out baseurl of "api.twitter.com" first in order create tokenrequest, have token, i'm not sure why step necessary.
thanks!
solution:
i've solved problem using c# bundle tweetsharp
var service = new twitterservice(_twitterconfiguration.consumerkey, _twitterconfiguration.consumersecret); service.authenticatewith(_twitterconfiguration.accesstoken, _twitterconfiguration.accesstokensecret);
the above need connected twitter-api-1.1 service (as you're relevant tokens)
c# oauth twitter restsharp
No comments:
Post a Comment