2017 © Pedro Peláez
 

joomla-package linkedin

Joomla Linkedin Package

image

joomla/linkedin

Joomla Linkedin Package

  • Friday, May 25, 2018
  • by mbabker
  • Repository
  • 18 Watchers
  • 3 Stars
  • 174 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 11 Versions
  • 0 % Grown

The README.md

The LinkedIn Package Build Status

Deprecated

The joomla/linkedin package is deprecated with no further updates planned., (*1)

Using the LinkedIn Package

The LinkedIn package is designed to be a straightforward interface for working with LinkedIn. It is based on the REST API. You can find documentation on the API at http://developer.linkedin.com/rest., (*2)

Instantiating Linkedin

Instantiating Linkedin is easy:, (*3)

use Joomla\Linkedin\Linkedin;

$linkedin = new Linkedin;

This creates a basic Linkedin object that can be used to access resources on linkedin.com, using an active access token., (*4)

Generating an access token can be done by instantiating OAuth., (*5)

Create a LinkedIn application at https://www.linkedin.com/secure/developer in order to request permissions. Instantiate OAuth, passing the Registry options needed. By default you have to set and send headers manually in your application, but if you want this to be done automatically you can set Registry option 'sendheaders' to true., (*6)

use Joomla\Linkedin\Linkedin;
use Joomla\Linkedin\OAuth;
use Joomla\Registry\Registry;

$options = new Registry;
$options->set('consumer_key', $consumer_key);
$options->set('consumer_secret', $consumer_secret);
$options->set('callback', $callback_url);
$options->set('sendheaders', true);
$oauth = new OAuth($options);

$linkedin = new Linkedin($oauth);

Now you can authenticate and request the user to authorise your application in order to get an access token, but if you already have an access token stored you can set it to the OAuth object and if it's still valid your application will use it., (*7)

// Set the stored access token.
$oauth->setToken($token);

$access_token = $oauth->authenticate();

When calling the authenticate() method, your stored access token will be used only if it's valid, a new one will be created if you don't have an access token or if the stored one is not valid. The method will return a valid access token that's going to be used., (*8)

Accessing the LinkedIn API's objects

The LinkedIn package covers almost all Resources of the REST API: * Communications object interacts with Communications resources. * Companies object interacts with Companies resources. * Groups object interacts with Groups resources. * Jobs object interacts with Jobs resources. * People object interacts with People and Connections resources. * Stream object interacts with Social Stream resources., (*9)

Once a Linkedin object has been created, it is simple to use it to access LinkedIn:, (*10)

$people = $linkedin->people->getConnections();

This will retrieve a list of connections for a user who has granted access to his/her account., (*11)

A More Complete Example

Below is an example demonstrating more of the Linkedin package., (*12)

use Joomla\Linkedin\Linkedin;
use Joomla\Linkedin\OAuth;
use Joomla\Registry\Registry;

$app_id = "app_id";
$app_secret = "app_secret";
$my_url = 'http://localhost/linkedin_test.php';


$options = new Registry;
$options->set('consumer_key', $key);
$options->set('consumer_secret', $secret);
$options->set('callback', $my_url);
$options->set('sendheaders', true);

$oauth = new OAuth($options);
$oauth->authenticate();

$linkedin = new Linkedin($oauth);

$people = $linkedin->people;
$response = $people->getProfile();

More Information

The following resources contain more information: * Joomla! API Reference * LinkedIn REST API Reference, (*13)

Installation via Composer

Add "joomla/linkedin": "~1.0" to the require block in your composer.json and then run composer install., (*14)

{
    "require": {
        "joomla/linkedin": "~1.0"
    }
}

Alternatively, you can simply run the following from the command line:, (*15)

composer require joomla/linkedin "~1.0"

The Versions

25/05 2018

dev-2.0-dev

dev-2.0-dev https://github.com/joomla-framework/linkedin-api

Joomla Linkedin Package

  Sources   Download

GPL-2.0+ GPL-2.0-or-later

The Requires

 

The Development Requires

framework joomla linkedin

25/05 2018

dev-master

9999999-dev https://github.com/joomla-framework/linkedin-api

Joomla Linkedin Package

  Sources   Download

GPL-2.0+ GPL-2.0-or-later

The Requires

 

The Development Requires

framework joomla linkedin

09/02 2014

1.1.1

1.1.1.0 https://github.com/joomla-framework/linkedin-api

Joomla Linkedin Package

  Sources   Download

GPL-2.0+

The Requires

 

The Development Requires

framework joomla linkedin

29/11 2013

1.0

1.0.0.0 https://github.com/joomla/joomla-framework-linkedin

Joomla Linkedin Package

  Sources   Download

GPL-2.0+

The Requires

 

framework joomla linkedin

29/11 2013

1.1.0

1.1.0.0 https://github.com/joomla/joomla-framework-linkedin

Joomla Linkedin Package

  Sources   Download

GPL-2.0+

The Requires

 

framework joomla linkedin

22/10 2013

1.0-beta3

1.0.0.0-beta3 https://github.com/joomla/joomla-framework-linkedin

Joomla Linkedin Package

  Sources   Download

GPL-2.0+

The Requires

 

framework joomla linkedin

16/08 2013

1.0-beta2

1.0.0.0-beta2 https://github.com/joomla/joomla-framework-linkedin

Joomla Linkedin Package

  Sources   Download

GPL-2.0+

The Requires

 

framework joomla linkedin

16/08 2013

1.0-beta

1.0.0.0-beta https://github.com/joomla/joomla-framework-linkedin

Joomla Linkedin Package

  Sources   Download

GPL-2.0+

The Requires

 

framework joomla linkedin

04/06 2013

1.0-alpha

1.0.0.0-alpha https://github.com/joomla/joomla-framework-linkedin

Joomla Linkedin Package

  Sources   Download

GPL-2.0+

The Requires

 

framework joomla linkedin