PHP notice

Undefined index: oauth_token

/var/www/kit-urbano-map/protected/components/twitter/TwitterOAuth.php(80)

68 
69 
70   /**
71    * Get a request_token from Twitter
72    *
73    * @returns a key/value array containing oauth_token and oauth_token_secret
74    */
75   function getRequestToken($oauth_callback) {
76     $parameters = array();
77     $parameters['oauth_callback'] = $oauth_callback; 
78     $request = $this->oAuthRequest($this->requestTokenURL(), 'GET', $parameters);
79     $token = OAuthUtil::parse_parameters($request);
80     $this->token = new OAuthConsumer($token['oauth_token'], $token['oauth_token_secret']);
81     return $token;
82   }
83 
84   /**
85    * Get the authorize URL
86    *
87    * @returns a string
88    */
89   function getAuthorizeURL($token, $sign_in_with_twitter = TRUE) {
90     if (is_array($token)) {
91       $token = $token['oauth_token'];
92     }

Stack Trace

#0
+
 /var/www/kit-urbano-map/protected/controllers/TwitterController.php(37): TwitterOAuth->getRequestToken("https://www.sanjoseinteligente.uy/twitter/callback")
32     
33         // The TwitterOAuth instance
34         $twitteroauth = new TwitterOAuth($consumerKey, $consumerSecret);
35     
36         // Requesting authentication tokens, the parameter is the URL we will be redirected to
37         $request_token = $twitteroauth->getRequestToken($appUrl . '/twitter/callback');
38     
39         // Saving them into the session
40         Yii::app()->session['oauth_token'] = $request_token['oauth_token'];
41         Yii::app()->session['oauth_token_secret'] = $request_token['oauth_token_secret'];
42             
#13
+
 /var/www/kit-urbano-map/index.php(26): CApplication->run()
21 
22 // specify how many levels of call stack should be shown in each log message
23 defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',3);
24 
25 require_once($yii);
26 Yii::createWebApplication($config)->run();
2024-03-29 07:33:04 Apache/2.4.7 (Ubuntu) Yii Framework/1.1.13