Your SlideShare is downloading. ×
Facebook login migration (using php sdk (v3.0.0))
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

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

929

Published on

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

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
929
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 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 }

×