ccc/linkedin-importer-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

LinkedIn profile data importer for symfony

dev-master 2018-08-10 02:59 UTC

This package is not auto-updated.

Last update: 2019-02-20 17:36:24 UTC


README

Linkedin profile data importer for symfony

Installation

Add the package to your dependencies

{
    "require": {
        "ccc/linkedin-importer-bundle": "dev-master"
        ...
    }
}

Register the bundle in your kernel

public function registerBundles()
{
    $bundles = array(
        // ...
        new CCC\LinkedinImporterBundle\CCCLinkedinImporterBundle(),
        // ...
    );

Update your packages

$ php composer.phar update

Configuration

Add LinkedIn access details to your config:

ccc_linkedin_importer:
    company: Company Name
    app_name: Application Name
    api_key: <api key>
    secret_key: <secret key>
    oauth_user_token: <oauth user token>
    oauth_user_secret: <oauth user secret>

Basic Usage

See /LinkedinImporterBundle/DefaultController.php for examples

Requesting User Permissions

$importer = $this->get('ccc_linkedin_importer.importer');
$importer->setRedirect($url);
$importer->requestPermission();

Getting an access token

$access_token = $importer->setCode($code_retrived_from_permission_request)->requestAccessToken();

Pulling user data

Private profile data

$profile_data = $importer->requestUserData('private', $access_token);

Public profile data

$profile_url = 'http://linkedin.com/someones-profile';
$profile_data = $importer->setPublicProfileUrl($profile_url)->requestUserData('public', $access_token);