Category Archives: Facebook API

Facebook Javascript SDK – Reload/Redirect URL after Facebook Login

 
Update 2012-01-14: For OAuth 2.0 implementation, please refer to the new post.
Facebook Javascript SDK – Logout with OAuth 2.0

Update 2011-12-19: Since Facebook has updated their authentication system and HTTP to OAuth 2.0 and HTTPS. The following example will not work any more. i will update the post later. For more information, you can refer to Jerry Cain – Updated JavaScript SDK and OAuth 2.0 Roadmap

 

We tried a simple Facebook login using Facebook Javascript SDK yesterday.
Facebook Javascript SDK – A Simple Login Page

In the above post, the browser will not refresh the website URL after the Facebook login process is completed. We have to issue a refresh manually. Actually we can add the reload/redirect with just a simple API call.
Let’s add the FB.Event.subscribe in fb-login.php. Continue reading Facebook Javascript SDK – Reload/Redirect URL after Facebook Login

Facebook Javascript SDK – A Simple Login Page

 
Update 2012-01-13: For OAuth 2.0 implementation, please refer to the new post.
Facebook Javascript SDK – A Simple Login Page with OAuth 2.0

Update 2011-12-19: Since Facebook has updated their authentication system and HTTP to OAuth 2.0 and HTTPS. The following example will not work any more. i will update the post later. For more information, you can refer to Jerry Cain – Updated JavaScript SDK and OAuth 2.0 Roadmap

 

Facebook API allows your website to interact with the Facebook content. A very common usage is to authenticate a Facebook user to your website. Let’s try it now.

1. Create the a Facebook App @ Facebook Developers.

2. Enter the website URL under Select how your app integrates with Facebook.

3. Upload the following file to your web server. This file should be located at the URL which we enter in step 2.
fb-login.php Continue reading Facebook Javascript SDK – A Simple Login Page