On Wed, Aug 18, 2010 at 10:40:11AM -0700, Olu wrote:
> Hi, I've been able to get a token and secret for an user but however,
> I'm getting an error while trying to use the status/update call. I've
> googled the problem and tried several solutions but none seems to
> work. I'm not sure what the problem is and I've been looking at this
> for hours. I would appreciate another pair of eyes on this. Any help
> would be greatly appreciated. PHP code below.
> 
> 
> <?php
> 
> $ch = curl_init("http://api.twitter.com/1/statuses/update.json";);
> 
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
> curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
> curl_setopt($ch, CURLOPT_HTTPHEADER, array("Expect: ", "Authorization:
> $auth"));
> 
> $b = curl_exec($ch);
> 
> var_dump($b);
> 
> curl_close($ch);

curl defaults to GET, so you're signing a POST for the auth, but
doing a GET. Also, you're not sending the actual status you want to
update, just signing it.



-- 
Martin Dapas
@mahrteen

Reply via email to