Hi Alex,

I am using this code for posting status ..

<?php
        include("class.twitter.php");

        if(isset($_POST['name']) and isset($_POST['password'])){
        $t= new twitter();
         $t->username=$_POST['name'];
         $t->password=$_POST['password'];
         $res = $t->update('i am testing twitter.class.php');
         if($res===false){
           echo "ERROR<hr/>";
                 echo "<pre>";
           print_r($t->responseInfo);
                 echo "</pre>";
         }else{
           echo "SUCCESS<hr/>Status Posted";
         }
?>

It is display this Error ..
ERROR

Array
(
    [url] => http://twitter.com/statuses/update.json
    [content_type] => application/json; charset=utf-8
    [http_code] => 401
    [header_size] => 574
    [request_size] => 204
    [filetime] => -1
    [ssl_verify_result] => 0
    [redirect_count] => 0
    [total_time] => 0.699
    [namelookup_time] => 0.059
    [connect_time] => 0.381
    [pretransfer_time] => 0.381
    [size_upload] => 0
    [size_download] => 75
    [speed_download] => 107
    [speed_upload] => 0
    [download_content_length] => 75
    [upload_content_length] => 0
    [starttransfer_time] => 0.699
    [redirect_time] => 0
)

Please tell me what is the problem with this code

Thanks a Ton
Amol

On Nov 14, 11:45 am, "Alex Payne" <[EMAIL PROTECTED]> wrote:
> Which Twitter PHP class are you using?
>
>
>
> On Thu, Nov 13, 2008 at 10:24 PM, Rahul <[EMAIL PROTECTED]> wrote:
>
> > Hi All,
>
> > I am new to twitter API :)
> > I am trying to post status using API ...
>
> > Have a look on my code .
>
> > <?php
> >        include("class.twitter.php");
> >        $twit=new twitter();
> >        $response1=$twit->update("Hi it is working re dada",$_POST
> > ['name'],$_POST['password'] );
> > ?>
>
> > Please tell me what wrong I am doing..
>
> > Thanks
> > Rahul
>
> --
> Alex Payne - API Lead, Twitter, Inc.http://twitter.com/al3x

Reply via email to