Extract BearerToken from LinqToTwitter IAuthorizer

后端 未结 1 396
抹茶落季
抹茶落季 2021-01-22 06:12

Hopefully a simple answer to what I think is a simple question.

Is it possible to Extract the BearerToken from the IAuthorizer once I am authenticated? After using Linq

相关标签:
1条回答
  • 2021-01-22 06:58

    I'm assuming you're talking about ApplicationOnlyAuthorizer. The demos assign to IAuthorizer, so you need to convert to ApplicationOnlyAuthorizer to expose the BearerToken, like this:

            await auth.AuthorizeAsync();
            string bearerToken = (auth as ApplicationOnlyAuthorizer).BearerToken;
    
    0 讨论(0)
提交回复
热议问题