트위터 소셜 댓글 사용시 Could not connect to Twitter. Refresh the page or try again later. 이전에 나오는 Warning: Undefined array key 오류 수정
This commit is contained in:
@ -13,8 +13,8 @@ $connection = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
|
||||
$request_token = $connection->getRequestToken(OAUTH_CALLBACK);
|
||||
|
||||
/* Save temporary credentials to session. */
|
||||
$_SESSION['oauth_token'] = $token = $request_token['oauth_token'];
|
||||
$_SESSION['oauth_token_secret'] = $request_token['oauth_token_secret'];
|
||||
$_SESSION['oauth_token'] = $token = @$request_token['oauth_token'];
|
||||
$_SESSION['oauth_token_secret'] = @$request_token['oauth_token_secret'];
|
||||
|
||||
//print_r2($_SESSION); exit;
|
||||
|
||||
|
||||
@ -77,7 +77,7 @@ class TwitterOAuth {
|
||||
$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']);
|
||||
$this->token = new OAuthConsumer(@$token['oauth_token'], @$token['oauth_token_secret']);
|
||||
return $token;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user