HybridAuth

开源社交登录php库。(open source social login php library.)

Github星跟踪图

HybridAuth 是一个开源社会化登录PHP库。Hybridauth使开发人员可以轻松构建社交应用程序和工具,从而在社交层面上吸引访问者和客户,开始社会登录,并扩展到社交分享,用户个人资料,朋友列表,活动流,状态更新等。

Hybridauth的主要目标是在您的应用程序和各种社交网络API和身份提供程序(如Facebook,Twitter和Google)之间充当抽象API。

用法

Hybridauth提供了一些基本的例子。 您还可以在https://hybridauth.github.io 找到完整的Hybridauth文档。

$config = [    'callback' => 'https://example.com/path/to/script.php',    'keys' => [ 'key' => 'your-twitter-consumer-key', 'secret' => 'your-twitter-consumer-secret' ]];try {    $twitter = new Hybridauth\Provider\Twitter($config);    $twitter->authenticate();    $accessToken = $twitter->getAccessToken();    $userProfile = $twitter->getUserProfile();    $apiResponse = $twitter->apiRequest( 'statuses/home_timeline.json' );}catch(\Exception $e){    echo 'Oops, we ran into an issue! ' . $e->getMessage();}

要求

  • PHP 5.4+
  • PHP Session
  • PHP cURL

主要指标

概览
名称与所有者hybridauth/hybridauth
主编程语言PHP
编程语言HTML (语言数: 2)
平台
许可证Other
所有者活动
创建于2011-11-15 23:38:39
推送于2025-04-22 05:23:44
最后一次提交2025-04-22 08:22:57
发布数70
最新版本名称v3.12.1 (发布于 )
第一版名称v2.0.8 (发布于 )
用户参与
星数3.4k
关注者数206
派生数1.1k
提交数1.7k
已启用问题?
问题数766
打开的问题数74
拉请求数550
打开的拉请求数16
关闭的拉请求数100
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?

Hybridauth 3.1

Build Status Scrutinizer Code Quality Latest Stable Version Join the chat at https://gitter.im/hybridauth/hybridauth

Hybridauth enables developers to easily build social applications and tools to engage websites visitors and customers on a social level that starts off with social sign-in and extends to social sharing, users profiles, friends lists, activities streams, status updates and more.

The main goal of Hybridauth is to act as an abstract API between your application and the various social networks APIs and identities providers such as Facebook, Twitter and Google.

Usage

Hybridauth provides a number of basic examples. You can also find complete Hybridauth documentation at https://hybridauth.github.io

$config = [
    'callback' => 'https://example.com/path/to/script.php',
    'keys' => [ 'key' => 'your-twitter-consumer-key', 'secret' => 'your-twitter-consumer-secret' ]
];

try {
    $twitter = new Hybridauth\Provider\Twitter($config);

    $twitter->authenticate();

    $accessToken = $twitter->getAccessToken();
    $userProfile = $twitter->getUserProfile();
    $apiResponse = $twitter->apiRequest('statuses/home_timeline.json');
}
catch (\Exception $e) {
    echo 'Oops, we ran into an issue! ' . $e->getMessage();
}

Requirements

  • PHP 5.4+
  • PHP Session
  • PHP cURL

Installation

To install Hybridauth we recommend Composer, the now defacto dependency manager for PHP. Alternatively, you can download and use the latest release available at Github.

Versions Status, Version, Status, Repository, Documentation, PHP Version, ---------, -------------, -------------------------, -------------------------, -------------, 2.x, Maintenance, [v2][hybridauth-2-repo], v2, >= 5.3, 3.x, Development, v3, v3, >= 5.4, [hybridauth-2-repo]: https://github.com/hybridauth/hybridauth/tree/v2

Questions, Help and Support?

For general questions (i.e, "how-to" questions), please consider using StackOverflow instead of the Github issues tracker. For convenience, we also have a [low-activity] Gitter channel if you want to get help directly from the community.

License

Hybridauth PHP Library is released under the terms of MIT License.

For the full Copyright Notice and Disclaimer, see COPYING.md.