The statuses/update api can't post a url

Bug #581457 reported by michaelmorriss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Jisko
Invalid
Medium
Marcos Garcia

Bug Description

The statuses/update api can't post a url
When I use this for example
<?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:$password");
$buffer = curl_exec($curl_handle);
curl_close($curl_handle);
//curl_close($tw);
?>

it goes to the "jisko" website and says:

Not found
The page you're looking for doesn't exists.

Revision history for this message
Marcos Garcia (marcosgdf) wrote :

You forgot to replace $password with $userapi

Thanks!

Changed in jisko:
milestone: none → 3.0beta1
assignee: nobody → Marcos Garcia (marcosgdf)
importance: Undecided → Medium
status: New → In Progress
status: In Progress → Invalid
Revision history for this message
michaelmorriss (mrxqware) 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
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>

Revision history for this message
michaelmorriss (mrxqware) wrote :

yes I have, I can post normal messages but no URL's

Revision history for this message
Marcos Garcia (marcosgdf) wrote :

Could be a problem with a URL Shortening service? Please try to change it to
another one.

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

> yes I have, I can post normal messages but no URL's
>
> --
> 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>

Revision history for this message
michaelmorriss (mrxqware) wrote :

tried it, but I've got the same problem

Revision history for this message
Pats (pats) wrote :

Micheal its working for me.... url is coming as it is... didn't touch any url shortenings...

Pats

Revision history for this message
michaelmorriss (mrxqware) wrote :

:o ok, thanx for testing guys, I'll try to fix it.

Changed in jisko:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.