mutliuser OAuth

Skip to first unread message

Elroy Paisley

Sep 17, 2013, 5:10:10 PM9/17/13
Hi there, I am trying to write a PHP script that will retweet a given tweet ID#.  I'd like it to be flexible enough to retweet from different users depending on certain criteria.  So I assume I need a multiuser OAuth setup but have NO idea how to get started.  Can anyone point me toward code samples or tutorials?


Andrea Fernández

Oct 11, 2013, 11:53:43 AM10/11/13
That is a very complicated thing. The 140dev framework was constructed for single-user oauth Streaming API request. To go multi-user, you'll need to request twitter for credentials for each user that enters your website (access_token and access_token_secret), store them in a database an also your app has to be able to identify the user through cookies when he comes back to the site, then you search for the credentials in your database and sign the requests that will do the retweets with this unique, individual credentials. Retweets are supported by a different API, the REST API. This framework is for the Streaming API, which has nothing to do with retweets. I'm afraid to tell you're in the wrong path for what you're trying to do. I suggest you go for Abraham's Twitter Oauth library for PHP, wich uses the REST API that supports retweeting.

REST API resource for retweets
Abraham's PHP Library to support OAuth for Twitter's REST API (this library is recommended by Twitter):
Reply all
Reply to author
0 new messages