Home>

Thanks for your help. I'm writing an iOS app that uses firebase in swift.
I was able to authenticate with Twitter and add a user to firebase, but I'm stuck after that. (I'm a complete beginner with swift and firebase)

● I want to use the Twitter account used for authentication to separately fetch tweet data etc. via the Twitter API and display it in the app.

● I want to use an access token and an access token secret instead of a bearer token to use Twitter's API.

In order to get an access token, I think that I will throw the request token and request token secret returned at the time of authentication to https://api.twitter.com/oauth/access_token, but I need it at that time I'm having trouble preparing oauth_verifier.

I think that oauth_verifier is given as a return value to the callback address at the time of authentication, but since the callback is returned to google, it seems that it can not be obtained from the application.

what I want to know

● Is it possible to get the value of oauth_verifier called back to firebase side?

● Other tips, such as something I misunderstood in the first place

I would like to know the above. Thank you.

  • Answer # 1

    Hello, Thank you for your help. It's late, but I will report after the fact.

    After all, the value of oauth_verifier was unlikely to be obtained, so I solved it by another method.

    For firebase, stop Twitter authentication and switch to anonymous authentication

    Use PIN authentication on Twitter

    You can now log in to firebase, get a Twitter access token and an access token secret, and you've achieved your goal.

    I made a noise.

Related articles