How to handle multiple accounts using OAuth?

I have an application that sends multiple Twitter accounts, storing an array of usernames and passwords. Twitter recently updated its API, so I have to authenticate using OAuth instead of storing credentials. How can I do user authentication for multiple Twitter accounts in one process?

For example, I have a text box with a submit button. When the user clicks the submit button, I want the text field value to be sent to the user account user1, user2 and user3 Twitter. This means that they had to simultaneously log into 3 accounts at the same time, so that this single click worked correctly? How is this possible?

PS - I also do this for Facebook and is the same API / OAuth concept, so I tagged it also with the Facebook API.

+3
source share
2 answers

The user should not be simultaneously registered on 3 accounts; but he must authorize his application three times using different accounts.

See Twitter OAuth FAQ - Access Token Does Not Expire. As soon as the user authorizes your application, you save the access token in your database. Then you simply repeat the process again and save the next access token.

Facebook , "offline_access" . , .

+1

, , , 3 , (FB, Twitter Dropbox), oAuth , , / .

Hootsuite , , , , , "" , . . Twitter Hootsuite, , .

? , , oAuth?

!

AG3

+3

Source: https://habr.com/ru/post/1762950/


All Articles