Advertisement
ekaomk

Untitled

Jul 29th, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.79 KB | None | 0 0
  1. <?php
  2.  
  3. session_start(); //Session should be active
  4.  
  5. $app_id             = '431555557031282';  //Facebook App ID
  6. $app_secret         = '1a547fd5677f1b0a1547ceed3cdef664'; //Facebook App Secret
  7. $required_scope     = 'public_profile, publish_actions, email'; //Permissions required
  8. $redirect_url       = 'http://localhost/facebook-connect/'; //FB redirects to this page with a code
  9.  
  10. //include autoload.php from SDK folder, just point to the file like this:
  11. require_once('facebook-php-sdk\src\facebook.php');
  12.  
  13. $config = array(
  14.   'appId' => '431555557031282',
  15.   'secret' => '1a547fd5677f1b0a1547ceed3cdef664',
  16.   'fileUpload' => false, // optional
  17.   'allowSignedRequest' => false, // optional, but should be set to false for non-canvas apps
  18. );
  19.  
  20. $facebook = new Facebook($config);
  21.  
  22.  
  23.  
  24.  
  25. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement