Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Facebook actually support OAuth 2.0?

I've already succesfully implemented LinkedIn and Twitter Oauth 2.0 authorization in my App with external libraries. But I have problems with Facebook. It seems like it has different authorization flow.

I need to have 3 endpoints to implement OAuth: request token url, access token url and authorize token url.

For LinkedIn and Twitter I have them:

REQ_TOKEN_URL="https://api.linkedin.com/uas/oauth/requestToken";
ACCESS_TOKEN_URL="https://api.linkedin.com/uas/oauth/accessToken";
AUTHORIZE_TOKEN_URL="https://api.linkedin.com/uas/oauth/authorize";

REQ_TOKEN_URL="https://api.twitter.com/oauth/request_token";
ACCESS_TOKEN_URL="https://api.twitter.com/oauth/access_token";
AUTHORIZE_TOKEN_URL="https://api.twitter.com/oauth/authorize";

But for Facebook instead of request token I have

OAUTH_FACEBOOK_DIALOG = "https://www.facebook.com/dialog/oauth";

And I'm not sure if it's equal. Probably not, since it doen's work the way it did with LinedIn and Twitter.

And in Facebook documentation they suggest to start with redirecting user to "https://www.facebook.com/dialog/oauth", but in classical OAuth 2.0 first I have to request the token from request_token_URL.

So the question is: is Facebook authorization flow actually not OAuth 2.0 and I have to use different approach?

like image 277
Leo Avatar asked Sep 30 '11 08:09

Leo


1 Answers

Facebook does in fact fully support OAuth 2.0. Twitter currently does not support OAuth 2.0. LinkedIn OAuth 2.0 support I believe is still in beta. But yes, you will need to use a different approach for different versions of OAuth.

like image 55
bkaid Avatar answered Nov 27 '22 04:11

bkaid