christopherfouquier/facebook
Composer 安装命令:
composer require christopherfouquier/facebook
包简介
Integrate Facebook SDK into php
README 文档
README
Integrate Facebook SDK into php
- authentification
- permissions management
Installation
Add facebook to your dependencies using composer:
php composer.phar require "christopherfouquier/facebook":"dev-master"
Parameters
- appId : Application ID
- appSecret : Application Secret
- redirectUrl : Url to redirect
- permissions : array of facebook oAuth permissions needed for the app
Usage
The class call :
use facebook\Facebook;
We start sessions
session_start();
The class is instantiated
$facebook = new Facebook(
"xxx",
"xxx"
);
It retrieves the login URL.
$url = $facebook->connect();
It checks if the user is identified.
if (isset($_SESSION['fb_token']) && $_SESSION['fb_token'] != null) {
// Connected
}
else {
echo "<a href='". $url ."'>Connection from facebook</a>";
}
TODO
- Add featured
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-01-04