Twitter-C# desktop app-Oauth ,without PIN


#1

Hi,

I am trying to tweet through my C# app. I want to do it without user intervention. The issue is PIN. I want to avoid PIN. How can I do that . I heard I can use callback url.But ,how?..please see my code below. Thanks.

TwitterClientInfo ci = new TwitterClientInfo();
ci.ClientName = “cname”;
ci.ConsumerKey = “key”;
ci.ConsumerSecret = “secret”;

        TwitterService service = new TwitterService(ci);

        OAuthRequestToken requestToken = service.GetRequestToken();
           Uri uri = service.GetAuthorizationUri(requestToken);
               var browser = new IE(uri.ToString());
       browser.TextField(Find.ById("username_or_email")).TypeText("acc@gmail.com");
       browser.TextField(Find.ById("password")).TypeText("password");
       browser.Form(Find.ById("oauth_form")).Submit();
            string verifier = "here user has to enter pin,I want to avoid that"
           
        OAuthAccessToken access = service.GetAccessToken(requestToken,verifier);

       service.AuthenticateWith(access.Token,access.TokenSecret);
 
        service.BeginSendTweet("haiiii");

#2

need answer for this