Skip to content

Instantly share code, notes, and snippets.

@niraj-shah
Created February 19, 2015 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niraj-shah/87b06fdc27ff4599e187 to your computer and use it in GitHub Desktop.
Save niraj-shah/87b06fdc27ff4599e187 to your computer and use it in GitHub Desktop.
Getting started with the Facebook PHP SDK v4.1. Part b: Setting up the application.
<?php
// setup application using API keys and handlers
$fb = new Facebook\Facebook([
'app_id' => 'xxx',
'app_secret' => 'yyy',
'http_client_handler' => 'curl', // can be changed to stream or guzzle
'persistent_data_handler' => 'session' // make sure session has started
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment