Hybrid_Providers_Facebook::initialize PHP Method

initialize() public method

public initialize ( )
    function initialize()
    {
        if (!$this->config["keys"]["id"] || !$this->config["keys"]["secret"]) {
            throw new Exception("Your application id and secret are required in order to connect to {$this->providerId}.", 4);
        }
        if (isset($this->config['scope'])) {
            $scope = $this->config['scope'];
            if (is_string($scope)) {
                $scope = explode(",", $scope);
            }
            $scope = array_map('trim', $scope);
            $this->scope = $scope;
        }
        $trustForwarded = isset($this->config['trustForwarded']) ? (bool) $this->config['trustForwarded'] : false;
        $this->api = new FacebookSDK(['app_id' => $this->config["keys"]["id"], 'app_secret' => $this->config["keys"]["secret"], 'default_graph_version' => 'v2.8', 'trustForwarded' => $trustForwarded]);
    }