/** * Initialize a Facebook Application. * * The configuration: * - appId: the application ID * - secret: the application secret * - fileUpload: (optional) boolean indicating if file uploads are enabled * - allowSignedRequest: (optional) boolean indicating if signed_request is * allowed in query parameters or POST body. Should be * false for non-canvas apps. Defaults to true. * * @param array $config The application configuration */ public static function setAuth($config) { self::setAppId($config['appId']); self::setAppSecret($config['secret']); if (isset($config['fileUpload'])) { self::setFileUploadSupport($config['fileUpload']); } if (isset($config['trustForwarded']) && $config['trustForwarded']) { self::$trustForwarded = true; } if (isset($config['allowSignedRequest']) && !$config['allowSignedRequest']) { self::$allowSignedRequest = false; } $state = self::getPersistentData('state'); if (!empty($state)) { self::$state = $state; } }