本文整理汇总了PHP中Facebook\Facebook::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Facebook::__construct方法的具体用法?PHP Facebook::__construct怎么用?PHP Facebook::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Facebook\Facebook
的用法示例。
在下文中一共展示了Facebook::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* @param Config $config_handler
* @param Url $url
* @param array $config
*/
public function __construct(Config $config_handler, Url $url, array $config)
{
$this->config_handler = $config_handler;
$this->url = $url;
$this->default_config = $config;
parent::__construct($config);
}
示例2: __construct
/**
* Instantiates a new Facebook super-class object
*
* @param array $config
*
* @throws \Facebook\Exceptions\FacebookSDKException;
*/
public function __construct(array $config = [])
{
if (!count($config)) {
$sysConfig = ZFactory::getConfig();
$config = ['app_id' => $sysConfig->social->facebook->appID, 'app_secret' => $sysConfig->social->facebook->appSecret, 'permissions' => $sysConfig->social->facebook->permissions, 'default_graph_version' => $sysConfig->social->facebook->defaultGraphVersion ? $sysConfig->social->facebook->defaultGraphVersion : 'v2.2'];
}
parent::__construct($config);
}
示例3: __construct
public function __construct($config = [])
{
try {
parent::__construct($config);
} catch (\Exception $e) {
$this->error = $e->getMessage();
}
$this->login_callback_url = isset($config['login_callback_url']) ? $config['login_callback_url'] : getenv('FACEBOOK_LOGIN_CALLBACK_URL');
$this->access_token = isset($config['access_token']) ? $config['access_token'] : null;
}
示例4: __construct
/**
* @param Config $config_handler
* @param \Illuminate\Contracts\Routing\UrlGenerator|\Laravel\Lumen\Routing\UrlGenerator $url
* @param array $config
*/
public function __construct(Config $config_handler, $url, array $config)
{
if (!is_a($url, 'Laravel\\Lumen\\Routing\\UrlGenerator') && !is_a($url, 'Illuminate\\Contracts\\Routing\\UrlGenerator')) {
throw new \InvalidArgumentException('Invalid UrlGenerator');
}
$this->config_handler = $config_handler;
$this->url = $url;
$this->default_config = $config;
parent::__construct($config);
}
示例5: __construct
/**
* Facebook constructor
*
* @param Config $config
*
* @throws \Facebook\Exceptions\FacebookSDKException
*/
public function __construct(Config $config)
{
if ($config->isEnabled()) {
parent::__construct(['app_id' => $config->getApiKey(), 'app_secret' => $config->getApiSecret(), 'default_graph_version' => $config->getVersion()]);
}
}
示例6: __construct
public function __construct(array $configs)
{
parent::__construct($configs);
}
示例7: array
function __construct()
{
$config = array('appId' => Config::get('laravel-facebook::appId'), 'secret' => Config::get('laravel-facebook::secret'));
parent::__construct($config);
}
示例8: __construct
/**
* Construct
*/
public function __construct()
{
$config = array('app_id' => KACANA_SOCIAL_FACEBOOK_KEY, 'app_secret' => KACANA_SOCIAL_FACEBOOK_SECRET, 'default_graph_version' => 'v2.8');
parent::__construct($config);
}
示例9: FacebookPersistentDataHandler
function __construct()
{
parent::__construct(['app_id' => Config::get('services.facebook_oauth.app_id'), 'app_secret' => Config::get('services.facebook_oauth.app_secret'), 'default_graph_version' => 'v2.5', 'persistent_data_handler' => new FacebookPersistentDataHandler()]);
}