Home | Stories | Reviews | Treo™ Store | Accessories | Software | Discussion | Mobile | About | Search

 
 
Slip Case Palm Slip Case for Pixi
Just $27.95
Micro-USB Travel Charger SPE Micro-USB Travel Charger for Palm Pixi / Treo Pro, Treo 800w
Just $9.95
Treo Screen Protectors  (3-Pack) Screen Protectors for Treo
Just $12.95
InnoCase II Seidio InnoCase II for Treo Pro
Just $29.95
 
Old 08/27/2009, 11:38 PM   #1 (permalink)
Member
 
Join Date: Nov 2003
Posts: 195
Thanks: 11
Thanked 13 Times in 4 Posts
Default Tweet directly from global search (requires a web host and PHP)

Fair warning - there may be a more secure way to do this, but I'm not overly concerned about the terribly minuscule chance of someone figuring out how to post a fake tweet to my account. YMMV.

Your server will need to have PHP and Curl installed at the very least.

I used the instructions here
Search results - WebOS Internals

to add a few new items to global search, including Amazon, Twitter search, Gmail, and posting directly to twitter using the PHP API. What I did was create a php script on my web server that looks like this:
Code:
<?php
$uname = 'YOUR TWITTER USERNAME';//example "blah" for twitter.com/blah, or your email address
$pwd = 'YOUR PASSWORD HERE';

$twitter_url = 'http://twitter.com/statuses/update.xml';
$curl_handle = curl_init();
curl_setopt($curl_handle,CURLOPT_URL,"$twitter_url");
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl_handle,CURLOPT_POST,1);
curl_setopt($curl_handle,CURLOPT_POSTFIELDS,"status=" . $_GET['status']);
curl_setopt($curl_handle,CURLOPT_USERPWD,"$uname:$pwd");
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
if (empty($buffer)){echo '<br/>message';}else{echo '<br/>success';}
?>
Save the file on your server as something like post-to-twitter.php, then follow the instructions at

Search results - WebOS Internals

to add the necessary new global search option and graphic. For the url that would normally be a search string, use

Code:
http://www.yourserver.com/post-to-twitter.php?status=
Now, from anywhere you can get to global search, just start typing your tweet. Choose your new search option when you're done typing it out and voila!

Thoughts?
dirtygreek is offline   Reply With Quote
Reply


Thread Tools
Display Modes

~


All times are GMT -4. The time now is 10:42 AM.

Creating smartphone communities
Android Central - Android reviews, news and forums Crackberry - Blackberry news, reviews and community TiPb - iPhone news, accessory reviews & forums
Pre Central - Palm Pre Review, News and Community Treo Central - Treo & Centro News and Forums WMExperts - Windows Mobile Reviews & News

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
 
 

Copyright ©1999- TreoCentral. All rights reserved : Terms of Use : Privacy Policy

TREO and TreoCentral are trademarks or registered trademarks of palm, Inc. in the United States and other countries;
the TreoCentral mark and domain name are used under license from palm, Inc.
The views expressed on this website are solely those of the proprietor, or
contributors to the site, and do not necessarily reflect the views of palm, Inc.

Explore More: Crackberry | WMExperts | the iPhone Blog | Android Central | Smartphone Experts Combined Forums