Skip to content

Commit 5053045

Browse files
committed
Update Readme files
1 parent 2135cc6 commit 5053045

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,14 @@ Use `Scope` enum class to get scope names.
7676
To get redirect url to LinkedIn, use the following approach:
7777

7878
```php
79+
use LinkedIn\Scope;
80+
7981
// define scope
8082
$scopes = [
81-
'r_basicprofile',
82-
'r_emailaddress',
83-
'rw_company_admin',
84-
'w_share',
83+
Scope::READ_BASIC_PROFILE,
84+
Scope::READ_EMAIL_ADDRESS,
85+
Scope::MANAGE_COMPANY,
86+
Scope::SHARING,
8587
];
8688
$loginUrl = $client->getLoginUrl($scopes); // get url on LinkedIn to start linking
8789
```

examples/README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,36 @@
11
# How to run examples
22

3-
First, clone repository.
3+
First, [clone](https://help.github.com/articles/cloning-a-repository/) repository.
4+
5+
```bash
6+
git clone https://github.com/zoonman/linkedin-api-php-client
7+
```
8+
Change dir to the repo
9+
```bash
10+
cd linkedin-api-php-client
11+
```
412

513
Install dependencies:
614

715
```bash
816
composer install [-d /path/to/repository/root]
917
```
18+
If you don't have composer, you can get it [here](https://getcomposer.org/doc/00-intro.md).
19+
Parameters in brackets are optional.
1020

1121
Create `.env` file with linkedin credentials in the parent catalog (in the repository root) like this
1222

1323
```ini
14-
LINKEDIN_CLIENT_ID=111ClinetId111
24+
LINKEDIN_CLIENT_ID=111ClientId111
1525
LINKEDIN_CLIENT_SECRET=222ClientSecret
1626
```
1727

28+
The simplest way to do that to run the following commands:
29+
```bash
30+
echo 'LINKEDIN_CLIENT_ID=111ClientId111' >> .env
31+
echo 'LINKEDIN_CLIENT_SECRET=222ClientSecret' >> .env
32+
```
33+
1834
To get client and secret go to [LinkedIn Developers portal](https://developer.linkedin.com/) and create new app there.
1935

2036
After add to OAuth 2.0 Authorized Redirect URLs:

0 commit comments

Comments
 (0)