HybridAuth

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

Github stars Tracking Chart

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

Main metrics

Overview
Name With Ownerhybridauth/hybridauth
Primary LanguagePHP
Program languageHTML (Language Count: 2)
Platform
License:Other
所有者活动
Created At2011-11-15 23:38:39
Pushed At2025-04-22 05:23:44
Last Commit At2025-04-22 08:22:57
Release Count70
Last Release Namev3.12.1 (Posted on )
First Release Namev2.0.8 (Posted on )
用户参与
Stargazers Count3.4k
Watchers Count206
Fork Count1.1k
Commits Count1.7k
Has Issues Enabled
Issues Count766
Issue Open Count74
Pull Requests Count550
Pull Requests Open Count16
Pull Requests Close Count100
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

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.