Reputation: 100
I'm currently working on a project to allow people to manage several social networks profiles in one place and I'm facing a problem when it comes to manage the profiles of the users. (Something like hootsuite)
What I want to do is to have my own database of users and have them to log in with that account so they can associate different profiles from different social networks to that account (instead of using the settings of the phone, like for twitter or facebook) the reason for this is because I want to be able to limit the amount of profiles a user can associated to the account per social network.
Question: How can I manage several twitter profiles without having them on the device settings?
Upvotes: 1
Views: 118
Reputation: 100
To be able to manage several profiles without having to use the settings of the device, you need to implement (In case of Twitter) the "sign in with twitter", this will make you go through several steps in order to get the access_token. This steps are:
Make a request to get a request_token. (POST oauth/request_token) This will return to you 3 things, an oauth_token, an oauth_token_secret and oauth_callback_confirmed.
With this tokens you need to open the web browser and pass the oauth_token as parameter to this address GET oauth/authorize, this page will ask the user to make log in with his/her account and to authorize your app. Once the user authorize your app, you need to make a callback to the app to recive 2 more tokens (http://iosdevelopertips.com/cocoa/launching-your-own-application-via-a-custom-url-scheme.html)
With this two new tokens you will make a final request (POST oauth/access_token) to finally get the access_token.
This access_token you get is the one you need to send with each request in order to get the information you want.
The instrucctions you need to follow are here https://dev.twitter.com/docs/auth/implementing-sign-twitter
Upvotes: 0