I try to do the same than : use facebook iOS client authorization on own to server, but with twitter.
I use SSO with Twitter Kit (Fabric) on iOS. I manage to sign in and get the authToken and authTokenSecret of the user. Then, I would like to send these to my server, so that I can retrieve the corresponding user in my own database.
I know I have to use a OAuth client. Working with Rails, I use the twitter gem.
But when I try to do :
client = Twitter::REST::Client.new do |config|
config.consumer_key = "YOUR_CONSUMER_KEY" #I added my rail app at twitter dev center
config.consumer_secret = "YOUR_CONSUMER_SECRET" #idem
config.access_token = "YOUR_ACCESS_TOKEN" #from the ios app
config.access_token_secret = "YOUR_ACCESS_SECRET" #from the ios app
end
I keep having a 401 Twitter::Error::Unauthorized, Could not authenticate you. And I'm stuck. Did I do something wrong?
Is this because the ios app that fetched the first access tokens is different than the rails app (and so the consumer_key/secret of the rails app won't work)?
Thank you very much
Jery
PS: I have been stuck for several days, so if you have an answer, you will save my week ;)