Hi Morris, This is assuming you are using the "twitter-oauth" library on http://github.com/abraham/twitteroauth
Add some fields to your member table, "oauth_token" and "oauth_token_secret".. So you're member table may look like this: id, username, oauth_token, oauth_token_secret When a user signs up for an event check if oauth_token and oauth_token_secret is NULL or empty or whatever... if it is then: On callback.php; when the $_SESSION['access_token'] is set, you can store those keys ($_SESSION['access_token']['oauth_token'] and $_SESSION['access_token']['oauth_token_secret']) in your database for the specific user. Now, when a user signs up for the event all you got to do is grab the oauth_token and oauth_token_secret from the database and use those when initiating the Twitter class. Hope this helps! On Sep 15, 5:30 am, Morris Li <morris...@gmail.com> wrote: > Hi, > > My client requested a function to enable his club members to auto post > tweets to twitter when they join any event on the website. When any > member signs up for an event, we do something about updating the > database, and at that point, we also want to post a tweet to twitter. > > Following the example I can work out how to post a message using PHP > after getting authorization. But what I can do now is slight different > from what I need to. i.e. we expect a member login once on our site > then he / she doesn't need to login again every time he / she signs an > event. Is it possible to achieve this by a PHP script? > > Many thanks for all of you. > Morris Li -- Twitter developer documentation and resources: http://dev.twitter.com/doc API updates via Twitter: http://twitter.com/twitterapi Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list Change your membership to this group: http://groups.google.com/group/twitter-development-talk?hl=en