I wrote a small PHP script which can be run CLI: Its at: http://dor.ky/entry/twitter-api-oauth-update-status
If you need any help adapting that to your needs, just pop me an email off list and I'll be happy to help you. Scott. On 5 Sep 2010, at 03:16, mikesouthern wrote: > But ... but ... I'm trying to do a similar kind of thing from a perl > command line. > > I looked at this on github before, and where it says: > // Register an application at http://dev.twitter.com/apps and from > your new apps page get "my access token". > > There is no "application" for me to go to in order to get an access > token. I also need the script to run from a cron scheduler so I can't > have it stop and ask me for a verification PIN with each run. > > Have you come across similar difficulties elsewhere? My searches are > turning up tantalisingly incomplete and inconsistent code snippets > that don't work .. > > On Sep 4, 5:52 pm, Abraham Williams <4bra...@gmail.com> wrote: >> Have a look athttp://gist.github.com/564882 >> >> Abraham >> ------------- >> Abraham Williams | Hacker Advocate |http://abrah.am >> @abraham |http://projects.abrah.am|http://blog.abrah.am >> This email is: [ ] shareable [x] ask first [ ] private. >> >> On Thu, Sep 2, 2010 at 19:50, David <dav...@alltraders.com> wrote: >>> I found out twitter does not support Basic Auth any, and I wonder how >>> can I change my code from Basic Auth to OAuth. >> >>> and my code like following: >> >>> $username=username; >>> $password=password; >>> $message=message; >>> $host = "http://twitter.com/statuses/update.xml"; >>> $ch = curl_init(); >>> curl_setopt($ch, CURLOPT_URL, $host); >>> //curl_setopt($ch, CURLOPT_VERBOSE, 1); >>> //curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); >>> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); >>> curl_setopt($ch, CURLOPT_TIMEOUT, $config->timeout ); >>> curl_setopt($ch, CURLOPT_USERPWD, "$username:$password"); >>> curl_setopt($ch, CURLOPT_POSTFIELDS,"status=$message"); >>> //curl_setopt($ch, CURLOPT_HTTP_VERSION, >>> CURL_HTTP_VERSION_1_1); >>> curl_setopt($ch, CURLOPT_POST, 1); >>> $result = curl_exec($ch); >>> // Look at the returned header >>> $resultArray = curl_getinfo($ch); >>> curl_close($ch); >> >>> -- >>> 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 > > -- > 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 Scott Wilcox t: +44 (0) 7538 842418 +1 (646) 257 0580 e: sc...@dor.ky w: http://dor.ky http://synfinaty.com
smime.p7s
Description: S/MIME cryptographic signature