README.md in omnicontacts-0.3.5 vs README.md in omnicontacts-0.3.6
- old
+ new
@@ -6,10 +6,18 @@
OmniContacts uses the OAuth protocol to communicate with the contacts provider. Yahoo still uses OAuth 1.0, while
Facebook, Gmail and Hotmail support OAuth 2.0.
In order to use OmniContacts, it is therefore necessary to first register your application with the provider and to obtain client_id and client_secret.
+## Contribute!
+Me (rubytastic) and the orginal author Diego don't actively use this code at the moment, anyone interested in maintaining and contributing to this codebase please write me up in a personal message ( rubytastic )
+I try to merge pull requests in every once and a while but this code would benefit from someone actively use and contribute to it.
+
+## Gem build updates
+There is now a new gem build out which should address many issues people had when posting on the issue tracker. Please update to the latest GEM version if you have problems before posting new issues.
+
+
## Usage
Add OmniContacts as a dependency:
```ruby
@@ -23,17 +31,18 @@
require "omnicontacts"
Rails.application.middleware.use OmniContacts::Builder do
importer :gmail, "client_id", "client_secret", {:redirect_path => "/oauth2callback", :ssl_ca_file => "/etc/ssl/certs/curl-ca-bundle.crt"}
importer :yahoo, "consumer_id", "consumer_secret", {:callback_path => '/callback'}
+ importer :linkedin, "consumer_id", "consumer_secret", {:redirect_path => "/oauth2callback", :state => '<long_unique_string_value>'}
importer :hotmail, "client_id", "client_secret"
importer :facebook, "client_id", "client_secret"
end
```
-Every importer expects `client_id` and `client_secret` as mandatory, while `:redirect_path` and `:ssl_ca_file` are optional.
+Every importer expects `client_id` and `client_secret` as mandatory, while `:redirect_path` and `:ssl_ca_file` are optional (except linkedin - `state` arg mandatory).
Since Yahoo implements the version 1.0 of the OAuth protocol, naming is slightly different. Instead of `:redirect_path` you should use `:callback_path` as key in the hash providing the optional parameters.
While `:ssl_ca_file` is optional, it is highly recommended to set it on production environments for obvious security reasons.
On the other hand it makes things much easier to leave the default value for `:redirect_path` and `:callback path`, the reason of which will be clear after reading the following section.
## Register your application
@@ -44,10 +53,13 @@
* For Hotmail : [Microsoft Developer Network](https://account.live.com/developers/applications/index)
* For Facebook : [Facebook Developers](https://developers.facebook.com/apps)
+* For Linkedin : [Linkedin Developer Network](https://www.linkedin.com/secure/developer)
+
+
##### Note:
Please go through [MSDN](http://msdn.microsoft.com/en-us/library/cc287659.aspx) if above Hotmail link will not work.
## Integrating with your Application
@@ -157,9 +169,28 @@
<td></td>
<td>X</td>
<td>X</td>
<td></td>
</tr>
+ <tr>
+ <td>Linkedin</td>
+ <td></td>
+ <td>X</td>
+ <td>X</td>
+ <td>X</td>
+ <td>X</td>
+ <td>X</td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <td></td>
+ <tr>
</table>
Obviously it may happen that some fields are blank even if supported by the provider in the case that the contact did not provide any information about them.
The information for the logged in user can also be accessed via 'omnicontacts.user' key in the environment hash. It consists of a simple hash which includes the same fields as above.