Yii Facebook Connect App using Facebook's new Oauth 2.0 and Graph API

Hi everyone

I have managed to wrap my head around Yii MVC architecture, and really am impressed.

I manged to create a facebook connect app using Facebooks client libraries for the new graph protocol, but have heard that the real way to properly create an app is to utilize Facebooks Oauth 2.0 protocol.

The steps are:

[list=1]Place a "Sign In With Facebook" link on your authentication page.[/list]

[list=2]The user will click the link which will redirect them to Facebook for authentication.[/list]

[list=3]After authenticating, the user will be required to Authorize your App.[/list]

[list=4]After authorization, Facebook will redirect back to your website, with a token representing the authenticated Facebook session.[/list]

[list=5]Taking this token, you will need to request an access token from Facebook’s Graph API Service.[/list]

[list=6]If token exchange is successful, you will be given an access token that you can then use with the Graph API.[/list]

[list=7]Using the Graph API, you then can query for the user’s holy grail…the UserId…[/list]

[list=8]You can save this UserId to your database and "go to town" relating "stuff" to it![/list]

Does anyone on this list have Oauth 2.0 experience?

If so, let me know - Im handcoding this myself, and would appreciate any and all tips!


Ps - here is the best page I’ve found explaining implementation: http://amirrajan.net/Blog/asp-mvc-and-facebook-single-sign-on

helpful information , although it 's a one year ago post ! :lol: