Facebook Login Migration (Using PHP SDK (v3.0.0))If you are doing migration from v2.2.x to v3.0.0You need to do the follow...
Upcoming SlideShare
Loading in …5
×

Facebook login migration (using php sdk (v3.0.0))

1,306 views

Published on

If you are doing migration from v2.2.x to v3.0.0.You need to do the following changes.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,306
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Facebook login migration (using php sdk (v3.0.0))

  1. 1. Facebook Login Migration (Using PHP SDK (v3.0.0))If you are doing migration from v2.2.x to v3.0.0You need to do the following changes. Download SDK: https://github.com/facebook/facebook-php-sdk Keep the two classes base_facebook.php and facebook.php with the certificate fb_ca_chain_bundle.crt Include facebook.php in your php file. If you’re currently using the PHP SDK (v2.2.x) for authentication, you will recall that the login code looked like this: include_once("facebook.php"); OR include_once("base_facebook.php"); $facebook = new Facebook(…); $session = $facebook->getSession(); if ($session) { // proceed knowing you have a valid user session } else { // proceed knowing you require user login and/or authentication } The login code is now: include_once("facebook.php"); $facebook = new Facebook(…); $user = $facebook->getUser(); if ($user) { // proceed knowing you have a logged in user whos authenticated } else { // proceed knowing you require user login and/or authentication }

×