sandklock / socialall
此包的最新版本(2.1.0)没有提供许可证信息。
SocialAll 是所有网络的一个 API
2.1.0
2015-10-30 09:40 UTC
Requires
- php: >=5.2.0
This package is not auto-updated.
Last update: 2024-09-28 19:14:54 UTC
README
SocialAll API PHP 库
注意: SocialAll 是一个针对 15+ 个流行社交网络的统一 API,支持社交登录、发布(支持视频和照片)、消息和邀请好友。
安装
$ composer require sandklock/socialall
访问 SocialAll 并免费注册一个应用程序。
使用方法
require_once 'vendor/autoload.php'; $sa = new SocialAll\SocialAll($app_id, $secret_key); error_log($sa->getLoginUrl('facebook', 'http://yourdomain.com/callback'));
API
$sa->getLoginUrl($network, $callback_url)
$network
--string
-- 查看 网络$callback_url
--string
- 返回
string
登录 URL
$sa->getUser($token, $callback)
$token
--string
$callback
--function ($err, $user)
$sa->getFriends($token, $callback)
$token
--string
-- 由 SocialAll 提供的 token$callback
--function ($err, $friends)
$sa->postStream($token, $message, $callback)
$token
--string
$message
--string
$callback
--function ($err)
$sa->sendMessage($token, $message, $friends, $title, $callback)
$token
--string
$message
--string
$friends
--array
-- 好友 ID 列表$title
--string
$callback
--function ($err)
网络
disqus
facebook
foursquare
github
google
lastfm
linkedin
live
mailru
plurk
reddit
tumblr
twitter
vkontakte
wordpress
错误和问题
如果您遇到任何错误或问题,请随意在 github 上提交问题。