Download the PHP package net-shell/linkedin-api without Composer

On this page you can find all versions of the php package net-shell/linkedin-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package linkedin-api

LinkedIn API client in PHP

Build Status Coverage Status SensioLabsInsight Latest Stable Version Monthly Downloads

A PHP library to handle authentication and communication with LinkedIn API. The library/SDK helps you to get an access token and when authenticated it helps you to send API requests. You will not get everything for free though... You have to read the LinkedIn documentation to understand how you should query the API.

To get an overview what this library actually is doing for you. Take a look at the authentication page from the API docs.

Features

Here is a list of features that might convince you to choose this LinkedIn client over some of our competitors'.

Installation

Install it with Composer.

Usage

In order to use this API client (or any other LinkedIn clients) you have to register your application with LinkedIn to receive an API key. Once you've registered your LinkedIn app, you will be provided with an API Key and Secret Key.

LinkedIn login

This example below is showing how to login with LinkedIn.

How to post on LinkedIn wall

The example below shows how you can post on a users wall. The access token is fetched from the database.

You may of course do the same in xml. Use the following options array.

Configuration

The api options

The third parameter of LinkedIn::api is an array with options. They will eventually be past to a Request client but before that we do some modifications. Below is a table of array keys that you may use.

Option name Description
body The body of a HTTP request. Put your xml string here.
debug This will echo the all the request and response headers. (Works with the Guzzle client only)
format Set this to 'json', 'xml' or 'simple_xml' to override the default value.
headers This is HTTP headers to the request
json This is an array with json data that will be encoded to a json string. Using this option you do need to specify a format.
query This is an array with query parameters

If you are using the GuzzleRequest (default) you may want to have a look at its documentation to find out what more options that are available.

Changing format

The default format when communicating with LinkedIn API is json. This means that you will get an array back as a response when you call LinkedIn::api. It is easy to change the format.

There is one exception to the format option: When you specifying $options['json'=>...] then the format will always be json.

Below is a table that specifies what format returns what when you call LinkedIn::api.

Format Return value
json An assosiative array
xml The XML response body as a string
simple_xml A SimpleXMLElement. See PHP manual.

Use different Request or Session classes

You might want to use an other storage than the default SessionStorage. If you are using Laravel you are more likely to inject the IlluminateSessionStorage.

You can inject any class implementing DataStorageInterface. You can also inject different request and url generator classes.

Using different scopes

If you want to define special scopes when you authenticate the user you should specify them when you are generating the login url. If you don't specify scopes LinkedIn will use the default scopes that you have configured for the app.

Framework integration

See how I integrated this with Symfony2.


All versions of linkedin-api with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
guzzlehttp/guzzle Version ~5.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package net-shell/linkedin-api contains the following files

Loading the files please wait ....