0

so I tried using https://github.com/abraham/twitteroauth/blob/master/twitteroauth/twitteroauth.php

and sometimes I get : Notice: Undefined index: oauth_token in /myweb/twitteroauth/twitteroauth.php on line 80

Notice: Undefined index: oauth_token_secret in /myweb/twitteroauth/twitteroauth.php on line 80

but sometimes it just run (confused ??)

the code in the twitteroauth.php line 80 :

function getRequestToken($oauth_callback) {
  $parameters = array();
  $parameters['oauth_callback'] = $oauth_callback; 
  $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
  $token = OAuthUtil::parse_parameters($request);
  $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
  //exit(print_r($request));
  return $token;
}

so as u can see above I tried

 exit(print_r($request));

the result was sometimes :

1

(error notice occurred)

and sometimes :

oauth_token=KzpRdIBm8inptvd3Xi254QUEsdf4f5eyO1XZyjW7xVU&oauth_token_secret=lmNl1rnBmR6palxHmufartersd0ivLabi5k&oauth_callback_confirmed=true1

(no error notice)

this is making me insane, can someone tell me what is the problem here ?

I tried looking at this thread : twitter oauth :geting undefined index: oauth_token_secret in

but doesn't help me :(

Thanks in advance !!

4

1 回答 1

0

strange, it is working ok now, maybe it was my internet connection that have a problem =/

于 2013-11-18T06:55:01.360 回答