File tree Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Expand file tree Collapse file tree 1 file changed +18
-4
lines changed Original file line number Diff line number Diff line change @@ -280,25 +280,39 @@ public function __call($fn, $params)
280
280
*
281
281
* @return string The OAuth authenticate URL
282
282
*/
283
- public function oauth_authenticate ()
283
+ public function oauth_authenticate ($ force_login = NULL , $ screen_name = NULL )
284
284
{
285
285
if ($ this ->_oauth_token == null ) {
286
286
throw new Exception ('To get the authenticate URL, the OAuth token must be set. ' );
287
287
}
288
- return self ::$ _endpoint_oauth . 'oauth/authenticate?oauth_token= ' . $ this ->_url ($ this ->_oauth_token );
288
+ $ url = self ::$ _endpoint_oauth . 'oauth/authenticate?oauth_token= ' . $ this ->_url ($ this ->_oauth_token );
289
+ if ($ force_login ) {
290
+ $ url .= "&force_login=1 " ;
291
+ }
292
+ if ($ screen_name ) {
293
+ $ url .= "&screen_name= " . $ screen_name ;
294
+ }
295
+ return $ url ;
289
296
}
290
297
291
298
/**
292
299
* Gets the OAuth authorize URL for the current request token
293
300
*
294
301
* @return string The OAuth authorize URL
295
302
*/
296
- public function oauth_authorize ()
303
+ public function oauth_authorize ($ force_login = NULL , $ screen_name = NULL )
297
304
{
298
305
if ($ this ->_oauth_token == null ) {
299
306
throw new Exception ('To get the authorize URL, the OAuth token must be set. ' );
300
307
}
301
- return self ::$ _endpoint_oauth . 'oauth/authorize?oauth_token= ' . $ this ->_url ($ this ->_oauth_token );
308
+ $ url = self ::$ _endpoint_oauth . 'oauth/authorize?oauth_token= ' . $ this ->_url ($ this ->_oauth_token );
309
+ if ($ force_login ) {
310
+ $ url .= "&force_login=1 " ;
311
+ }
312
+ if ($ screen_name ) {
313
+ $ url .= "&screen_name= " . $ screen_name ;
314
+ }
315
+ return $ url ;
302
316
}
303
317
304
318
/**
You can’t perform that action at this time.
0 commit comments