Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Example of chaining using Facebook PHP SDK 4.0.0
// 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
You can’t perform that action at this time.