जब मैन्युअल डीबगिंग है खुद)।
RestClient rc = new RestClient {Method = WebMethod.Get};
RestRequest rr = new RestRequest();
rr.Path = "https://api.twitter.com/1/account/verify_credentials.json";
rc.Credentials = new OAuthCredentials
{
ConsumerKey = /* put your key here */,
ConsumerSecret = /* put your secret here */,
Token = /* user access token */,
TokenSecret = /* user access secret */,
Type = OAuthType.AccessToken
};
rc.BeginRequest(rr, IsTokenValid);
यहाँ प्रतिक्रिया है::
यहाँ कॉल झूला का उपयोग कर ट्विटर करने के लिए है
public void IsTokenValid(RestRequest request, RestResponse response, object userState)
{
if(response.StatusCode == HttpStatusCode.OK)
{
var user = userState;
Helper.SaveSetting(Constants.TwitterAccess, user);
}
else
{
Dispatcher.BeginInvoke(() => MessageBox.Show("This application is no longer authenticated "))
}
}
मैं हमेशा से समाधान उधार, यह मेरा है, वापस देने के काफी यद्यपि पहला प्रयास है सवाल के देर से।
स्रोत
2012-01-23 17:16:19
अच्छा, धन्यवाद। कोई विचार नहीं कि मुझे यह क्यों नहीं मिला। – shanethehat
बीटीडब्ल्यू- यह अब https://dev.twitter.com/docs/api/1.1/get/account/verify_credentials है, एपीआई –