Comment 3 for bug 581457

Revision history for this message
Marcos Garcia (marcosgdf) wrote : Re: [Bug 581457] Re: The statuses/update api can't post a url

It worked for me :S. Have you got Clean Urls enabled?

On Mon, May 17, 2010 at 4:44 PM, michaelmorriss <email address hidden> wrote:

> <?php
> $username = 'jiskousername';
> $userapi = 'jiskouserapi';
> $message = 'http://google.com';
> $url = 'http://yourserver/api/statuses/update.xml';
> $curl_handle = curl_init();
> curl_setopt($curl_handle, CURLOPT_URL, "$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=$message");
> curl_setopt($curl_handle, CURLOPT_USERPWD, "$username:$userapi");
> $buffer = curl_exec($curl_handle);
> curl_close($curl_handle);
> //curl_close($tw);
> ?>
>
> Sorry I've copied the wrong code (i had the good one; otherwise it should
> gave me an authorisation error).
> But it still doesn't work.
> Could you test it?
>
> ** Changed in: jisko
> Status: Invalid => New
>
> --
> The statuses/update api can't post a url
> https://bugs.launchpad.net/bugs/581457
> You received this bug notification because you are a bug assignee.
>

--
marcos garcía // <email address hidden>