@@ 144-150 (lines=7) @@ | ||
141 | ||
142 | public function setAccessToken( $access_token, $access_token_secret, $consumerKey = null, $consumerSecret = null ) { |
|
143 | ||
144 | if ( !$this->client instanceof ar_connect_oauthClient ) { //FIXME: a real OAuth is also ok |
|
145 | // FIXME: what if you want a caching client? |
|
146 | $this->client = ar_connect_oauth::client( $consumerKey, $consumerSecret ); |
|
147 | if ( ar_error::isError($this->client) ) { |
|
148 | return $this->client; |
|
149 | } |
|
150 | } |
|
151 | ||
152 | return $this->client->setToken( $access_token, $access_token_secret ); |
|
153 | } |
|
@@ 166-172 (lines=7) @@ | ||
163 | $callback = ar_loader::makeURL().$callback; |
|
164 | } |
|
165 | ||
166 | if ( !$this->client instanceof ar_connect_oauthClient ) { ////FIXME: a real OAuth is also ok |
|
167 | // FIXME: what if you want a caching client? |
|
168 | $this->client = ar_connect_oauth::client( $consumerKey, $consumerSecret ); |
|
169 | if ( ar_error::isError($this->client) ) { |
|
170 | return $this->client; |
|
171 | } |
|
172 | } |
|
173 | ||
174 | $access_token = $session->getvar('access_token'); |
|
175 | $access_token_secret = $session->getvar('access_token_secret'); |