> $oauth = new TwitterOAuth($consumer_key, $consumer_secret,
> $request_token, $request_token_secret);
That's wrong. When requesting a token, you don't include the third and
fourth parameter. Better:
new TwitterOAuth($consumer_key, $consumer_secret);

If that doesn't fix the issue, I don't know. I don't really know the
TwitterOAuth library.

Tom



On 10/1/10 7:12 AM, bharani wrote:
> Hi am trying to post tweets using oauth (PHP)
> 
> i created the application in my twitter account ,
> 
> i executed some open source script but that produce the below error,
> 
> Notice: Undefined index: oauth_token_secret in
> 
> How to fix this issue
> 
> my snippet
> 
> require_once('twitterOAuth/twitterOAuth.php');
> require_once('twitterOAuth/OAuth.php');
> 
> 
> $consumer_key='q3fsdfsdfsdw';
> $consumer_secret='rfsdfsdfsdfsdfdsfsdL';
> $request_token='http://twitter.com/oauth/request_token';
> $request_token_secret='5454545';
> $oauth = new TwitterOAuth($consumer_key, $consumer_secret,
> $request_token, $request_token_secret);
> 
> // Ask Twitter for an access token (and an access token secret)
> $request = $oauth->getAccessToken();
> 
> $access_token = $request['amp;oauth_token'];
> $access_token_secret = $request['oauth_token_secret'];=======> HERE AM
> GETTING TROUBLE
> 
> function getAccessToken($token = NULL, $pin = NULL)
> {
>     if ($pin)
>         $r = $this->oAuthRequest($this->accessTokenURL(),
>             array("oauth_verifier" => $pin));
>     else
>         $r = $this->oAuthRequest($this->accessTokenURL());
> 
>     $token = $this->oAuthParseResponse($r);
>     $this->token = new OAuthConsumer($token['oauth_token'],
>         $token['oauth_token_secret']);
> 
>     return $token;
> }
> 
> My complete Error Here
> 
> Notice: Undefined index: oauth_token_secret in E:\wamp\www\source\oauth
> \twitterOAuth\twitteroauth.php on line 118
> 
> Notice: Undefined index: oauth_token_secret in E:\wamp\www\source\oauth
> \bharani.php
> 

-- 
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to