Twitter API Authenticate vs Authorize
Asked Answered
C

2

10

Hi all could you just tell what is the difference between Twitter Authenticate and Authorize

$twitterConnect = new TwitterOAuth(CONSUMER_KEY, CONSUMER_SECRET);
$twitterToken = $twitterConnect->getRequestToken();

$redirect_url = $twitterConnect->getAuthorizeURL($twitterToken, true); // authenticate 
$redirect_url = $twitterConnect->getAuthorizeURL($twitterToken, false); //authorize
Comparator answered 8/3, 2012 at 5:49 Comment(0)
T
19

With oauth/authenticate if the user is signed into twitter.com and has previously authorized the application to access their account they will be silently redirected back to the app.

With oauth/authorize the user will see the allow screen regardless if they have previously authorized the app.

Taker answered 8/3, 2012 at 7:8 Comment(1)
You are my life saver. :)Determinism
F
1

This method differs from GET oauth / authorize in that if the user has already granted the application permission, the redirect will occur without the user having to re-approve the application.

https://dev.twitter.com/oauth/reference/get/oauth/authenticate

Note:

  1. You must enable "Sign in with Twitter" in the application settings to achieve this.
  2. Desktop applications must use this authorize and not authenticate.
Fairing answered 6/5, 2015 at 7:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.