On Wed, Jun 3, 2009 at 5:50 PM, Niju Mohan  C P <[email protected]> wrote:
>
> Hello all,
>
> I use php with curl to post tweets.
>
> If my app is registered at twitter how can i specify the source.
>
> The following is the code i'm using...
>
>        $tweetUrl = 'http://www.twitter.com/statuses/update.xml';
>
>                $curl = curl_init();
>                curl_setopt($curl, CURLOPT_URL, "$tweetUrl");
>                curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
>                curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
>                curl_setopt($curl, CURLOPT_POST, 1);
>                curl_setopt($curl, CURLOPT_POSTFIELDS, "status=$status");

Its a simple parameter source. But the source must be registered I guess.
so You have to use
curl_setopt($curl, CURLOPT_POSTFIELDS, "status=$status&source=$source");
>                curl_setopt($curl, CURLOPT_USERPWD, "$twitterUsername:
> $twitterPassword");
>
>                $result = curl_exec($curl);
>                $resultArray = curl_getinfo($curl);
>



-- 
A K M Mokaddim
http://talk.cmyweb.net
http://twitter.com/shiplu
Stop Top Posting !!
বাংলিশ লেখার চাইতে বাংলা লেখা অনেক ভাল

Reply via email to