Download the PHP package azine/hybridauth-bundle without Composer
On this page you can find all versions of the php package azine/hybridauth-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download azine/hybridauth-bundle
More information about azine/hybridauth-bundle
Files in azine/hybridauth-bundle
Package hybridauth-bundle
Short Description Symfony2 bundle to access the profiles via Xing- and Linkedin-API, uses HybridAuth
License MIT
Homepage https://github.com/azine/AzineHybridAuthBundle
Informations about the package hybridauth-bundle
AzineHybridAuthBundle
Symfony2 bundle to integrate the HybridAuth library to get access the API of various social networks.
See https://github.com/hybridauth/hybridauth for more details on the integrated library.
Available APIs
A lot of providers are available. See the following two links for a complete list:
https://github.com/hybridauth/hybridauth/tree/master/hybridauth/Hybrid/Providers https://github.com/hybridauth/hybridauth/tree/master/additional-providers
Installation
To install AzineHybridAuthBundle with Composer just add the following to your composer.json
file:
Then, you can install the new dependencies by running Composer’s update command from
the directory where your composer.json
file is located:
Now, Composer will automatically download all required files, and install them for you. All that is left to do is to update your AppKernel.php file, and register the new bundle:
Register the routes of the AzineHybridAuthBundle:
If you want to store the users authentication session in the database, so the user is automatically reconnected in the next browser session, then you need to enable this feature in the config.yml and update your database schema either by running:
or create a database migration and apply it
Create apps on your preferred social networks/providers
LinkedIn => https://www.linkedin.com/secure/developer
Configuration
Configure at least one provider. See the links above for a list of available providers.
The providers in the "hybridauth\hybridauth\Hybrid\Providers"-folder are available by default via their ID, the providers in the "hybridauth\additional-providers"-folder must be configured. => see the configuration of the wrapper for the linkedIn provider below.
For the LinkedIn provider there are some extra functionalities implemented. For all others, there's the default functionality from the HybridAuth available.
Here's the example for the linkedin provider:
Define the keys and secrets for linkedin in you parameters.yml.dist file.
AzineMergedBusinessNetworksProvider
This service / provider offers some confienience methods to work with business-networks (LinkedIn). All methods expect the user to be "connected" to linkedin. If the user has not yet authorized your app to access the data, a http-redirect will be output directly by setting the html-header-location and calling "die".
Not cached, not paged.
getLinkedInContacts()
Get all linkedIn contacts of the current user.
Not cached, not paged.
As of May 2015 LinkedIn has limited the api-access. See https://developer.linkedin.com/support/developer-program-transition
Getting the LinkedinContacts will only work if you are in a LinkedIn partner programm and are allowed to access. See https://developer.linkedin.com/partner-programs
getContactProfiles($pageSize = 50, $offset = 0)
Get all contacts of the current user. Cached and paged.
The function getContactProfiles($pageSize = 50, $offset = 0) get's one page of contacts from the business networks.
The first call will take a fair bit longer than the following ones, because on the first call, ALL contacts from both networks are fetched and stored in one big array, sorted by last name. This collection is then stored in the user session.
Contribute
Contributions are very welcome. Please fork the repository and issue your pull-request against the master branch.
The PR should:
- contain a description what the PR solves or adds to the bundle (reference existing issues if applicable)
- contain clean code with some iniline documentation and phpdocs, no "pure whitespace" changes.
- respect the Symfony best practices and coding style
- have phpunit tests covering the new feature or fix
- result in a 'green' build for your branch on travis-ci.org before you issue the PR
Code style
You can check the code style with the php-cs-fixer
. Optionally you can set up a pre-commit hook which contains the php-cs-fixer
check. Also see https://github.com/FriendsOfPHP/PHP-CS-Fixer
All you have to do is to move pre-commit.sample
file from commit-hooks/
to .git/hooks/
folder and rename it to pre-commit
.
php-cs-fixer
will check the style of your new added code each time you commit and apply fixes to the commit.
To run php-cs-fixer
manually, install dependencies (composer install
) and execute php vendor/friendsofphp/php-cs-fixer/php-cs-fixer --diff --dry-run -v fix --config=.php_cs.dist .
Build-Status ec.
All versions of hybridauth-bundle with dependencies
symfony/framework-bundle Version ~2.1
symfony/console Version ~2.1
symfony/finder Version ~2.1
hybridauth/hybridauth Version ~2.3.0
monolog/monolog Version ~1.6