Skip to content

Commit 9ba0d3c

Browse files
committed
Update README with API v2 changes
1 parent 230c5bd commit 9ba0d3c

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

README.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
A LinkedIn OAuth2 strategy for OmniAuth.
66

7-
For more details, read the LinkedIn documentation: https://developer.linkedin.com/documents/authentication
7+
For more details, read the LinkedIn documentation: https://developer.linkedin.com/docs/oauth2
88

99
## Installation
1010

@@ -22,6 +22,8 @@ Or install it yourself as:
2222

2323
## Upgrading
2424

25+
This version is a major upgrade to the LinkedIn API version 2. As such, it switches from the soon to be no longer available `r_basicprofile` to `r_liteprofile`. This results in a much limited set of data that we can get from LinkedIn.
26+
2527
Previous versions of this gem used the provider name `:linkedin_oauth2`. In order to provide a cleaner upgrade path for users who were previously using the OAuth 1.0 omniauth adapter for LinkedIn [https://github.com/skorks/omniauth-linkedin], this has been renamed to just `:linkedin`.
2628

2729
Users who are upgrading from previous versions of this gem may need to update their Omniauth and/or Devise configurations to use the shorter provider name.
@@ -43,33 +45,33 @@ You can now access the OmniAuth LinkedIn OAuth2 URL: `/auth/linkedin`.
4345
## Granting Member Permissions to Your Application
4446

4547
With the LinkedIn API, you have the ability to specify which permissions you want users to grant your application.
46-
For more details, read the LinkedIn documentation: https://developer.linkedin.com/documents/authentication
48+
For more details, read the LinkedIn documentation: https://developer.linkedin.com/docs/oauth2
4749

4850
By default, omniauth-linkedin-oauth2 requests the following permissions:
4951

50-
'r_basicprofile r_emailaddress'
52+
'r_liteprofile r_emailaddress'
5153

5254
You can configure the scope option:
5355

5456
```ruby
55-
provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'], :scope => 'r_fullprofile r_emailaddress r_network'
57+
provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'], :scope => 'r_literofile'
5658
```
5759

5860
## Profile Fields
5961

6062
When specifying which permissions you want to users to grant to your application, you will probably want to specify the array of fields that you want returned in the omniauth hash. The list of default fields is as follows:
6163

6264
```ruby
63-
['id', 'email-address', 'first-name', 'last-name', 'headline', 'location', 'industry', 'picture-url', 'public-profile-url']
65+
['id', 'first-name', 'last-name', 'picture-url', 'email-address']
6466
```
6567

66-
Here's an example of a possible configuration where the fields returned from the API are: id, email-address, first-name and last-name.
68+
Here's an example of a possible configuration where the fields returned from the API are: id, first-name and last-name.
6769

6870
```ruby
69-
provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'], :fields => ['id', 'email-address', 'first-name', 'last-name']
71+
provider :linkedin, ENV['LINKEDIN_KEY'], ENV['LINKEDIN_SECRET'], :fields => ['id', 'first-name', 'last-name']
7072
```
7173

72-
To see a complete list of available fields, consult the LinkedIn documentation at: https://developer.linkedin.com/documents/profile-fields
74+
To see a complete list of available fields, consult the LinkedIn documentation at: https://developer.linkedin.com/docs/fields
7375

7476
## Contributing
7577

0 commit comments

Comments
 (0)