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
abraham
  • 46,583
  • 10
  • 100
  • 152
coderex
  • 27,225
  • 45
  • 116
  • 170

2 Answers2

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.

Wes
  • 894
  • 1
  • 7
  • 17
abraham
  • 46,583
  • 10
  • 100
  • 152
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.
kehers
  • 4,076
  • 3
  • 30
  • 31