Skip to content

Commit

Permalink
Merge pull request #51 from Nyholm/docs
Browse files Browse the repository at this point in the history
Minor documentation updates
  • Loading branch information
Nyholm committed May 26, 2015
2 parents 08ff6a4 + ea7cec4 commit 69e7872
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
31 changes: 13 additions & 18 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@

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][api-doc-core] to understand how you should query the API. We just help you
with the boring stuff.
have to read the [LinkedIn documentation][api-doc-core] 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][api-doc-authentication].
Expand All @@ -28,29 +27,21 @@ Here is a list of features that might convince you to choose this LinkedIn clien

## Installation

Install it with Composer!
Install it with Composer.

```js
// composer.json
{
// ...
require: {
// ...
"happyr/linkedin-api-client": "dev-master",
}
}
```bash
php composer.phar require happyr/linkedin-api-client:dev-master
```

Then, you can install the new dependencies by running the ``composer update``
command from the directory where your ``composer.json`` file is located:

## Usage

In order to use this API client (or any other LinkedIn clients) you have to [register your application][register-app]
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*.

This example below is a nicer way of connecting to LinkedIn compared to [their code samples][linkedin-code-samples].
### LinkedIn login

This example below is showing how to login with LinkedIn.

```php
<?php
Expand Down Expand Up @@ -84,7 +75,9 @@ echo "<a href='$url'>Login with LinkedIn</a>";

```

### Post on user's wall
### 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.

```php
$linkedIn=new Happyr\LinkedIn\LinkedIn('app_id', 'app_secret');
Expand Down Expand Up @@ -122,6 +115,8 @@ $options = array(
</share>');
```

## 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
Expand Down Expand Up @@ -192,7 +187,7 @@ $url = $linkedIn->getLoginUrl(array('scope'=>$scope));
echo "<a href='$url'>Login with LinkedIn</a>";
```

### Framework integration
## Framework integration

See how I integrated this with [Symfony2](docs/symfony.md).

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "happyr/linkedin-api-client",
"type": "library",
"description": "LinkedIn API client. Handles OAuth, CSRF protection. Easy to implement and extend. This is a standalone library for any composer project.",
"keywords": ["LinkedIn", "OAuth", "Happyr", "API", "Client", "SDK"],
"keywords": ["LinkedIn", "OAuth", "API", "Client", "SDK"],
"homepage": "http://developer.happyr.com/libraries/linkedin-php-client",
"license": "MIT",
"authors": [
Expand Down

0 comments on commit 69e7872

Please sign in to comment.