Hi Abraham,
  Thanks for your reply ! ... I am actually referring to your example
come with PHP library  (twitterOAuth)  to do my first Twitter App :)

I have read through the code in index.php , and I modified it to
output the token and token_secret on screen. Then I write another php
script , to use the consumer key , consumer secret , access_token and
access_token_secret to create an instance of TwitterOAuth , then call
OAuthRequest("https://twitter.com/statuses/update.xml";, array('status'
=> Test OAuth update. #testoauth', 'POST'), however, it returns "Could
not authenticate you"

Am I have the wrong concept ?


Below is my code

<code>
<?php

require_once('twitterOAuth.php');

/* Consumer key from twitter */
$consumer_key = '<my app key>';
/* Consumer Secret from twitter */
$consumer_secret = '<my App secret>';

$token = '<token get from index.php>';
$secret = '<secret get from index.php>'';


    $to = new TwitterOAuth($consumer_key, $consumer_secret, $token,
$secret);



    /* Run request on twitter API as user. */

    $content = $to->OAuthRequest('https://twitter.com/statuses/
update.xml', array('status' => 'Test OAuth update. #testoauth'),
'POST');

?>

print_r($content);

</code>






Thanks ...


On Jul 20, 4:26 pm, Abraham Williams <4bra...@gmail.com> wrote:
> On Mon, Jul 20, 2009 at 03:17, CG <learn....@gmail.com> wrote:
> > My question are
>
> > 1. In step 2, I save the token and secret , how long it will lasts ?
>
> Until the user revokes access. There is currently no amount of time access
> tokens are valid for.
>
>
>
> > 2. Is this app feasible or not ? Is twitter allow posting of update by
> > 3rd party app in background ?
>
> Yes. This is how many applications work.
> Abraham
>
> --
> Abraham Williams | Community Evangelist |http://web608.org
> Hacker |http://abrah.am|http://twitter.com/abraham
> Project |http://fireeagle.labs.poseurtech.com
> This email is: [ ] blogable [x] ask first [ ] private.
> Sent from Madison, WI, United States

Reply via email to