Jump to content

soichi

New Members
  • Posts

    2
  • Joined

  • Last visited

soichi's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. PHP 5.3.1 latest facebook-php-sdk https://github.com/facebook/facebook-php-sdk Currently I am working on Facebook web application which requires an authentication to extract fb information. The authentication process is of course to be done when users intend to login. But I need to split files so that maintenance of codes would be easier. More specifically, I want to have a single file.php that is responsible for the authentication, and other files read objects or whatever necessary from it in order to apply various functions to the application. the authentication goes like, switch(getenv("SERVER_NAME")) { case "xxx" define('FACEBOOK_APP_ID', ''); define('FACEBOOK_APP_SECRET', ''); define('HTTP_ROOT', 'http://xxx.facebookapp/'); define('DB_HOST', 'localhost'); define('DB_USER', 'root'); define('DB_PASSWORD', ''); define('DB_DATABASE', 'xxx'); break; } $facebook = new Facebook(array( 'appId' => FACEBOOK_APP_ID, 'secret' => FACEBOOK_APP_SECRET, )); I need this "$facebook" object in many other files. Somehow this part will be in an independent file, and other files refer to the object. Is it possible to do it? Can anyone help me out? soichi
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.