Last active
August 29, 2015 14:00
-
-
Save niraj-shah/e56a6e383248a4029437 to your computer and use it in GitHub Desktop.
Example of chaining using Facebook PHP SDK 4.0.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// turn this: | |
$request = new FacebookRequest( $session, 'GET', '/me' ); | |
$response = $request->execute(); | |
$graphObject = $response->getGraphObject(); | |
// into this: | |
$graphObject = (new FacebookRequest( $session, 'GET', '/me' ))->execute()->getGraphObject()->asArray(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment