The Sponger cartridge for LinkedIn is written to the LinkedIn REST API. In order to use this API, the cartridge must be configured with a LinkedIn API key. To obtain an API key, register the Sponger as a LinkedIn application. Any application name can be used, for example 'Sponger_{your-virtuoso-host}'. However the OAuth redirect URL must point to the /linkedin_oauth virtual path defined when the Cartridges VAD is installed, e.g. http://{your-virtuoso-host:port}/linkedin_oauth/linkedin_access_token.vsp.
Before you can obtain access tokens for the cartridge, you first need to register the Sponger as a LinkedIn application.
accept_lang
.
This entry in the cartridge options is not created by default.
LinkedIn? alters the language of some output fields.
Its choice of locale is based on the geographic location of the server.
By setting the accept_lang
option, you can allow LinkedIn?'s choice of locale to be overridden.
For ex:
accept_lang=en-us
http://example.com/linkedin_oauth/linkedin_access_token.vsp> directly in an browser address bar:
- Click "Ok, I'll Allow it":
The LinkedIn user whose profile is to be fetched should first grant an OAuth access token. This can be done through the LinkedIn button displayed by http://{your-virtuoso-host:port}/sponger:
Although it is not mandatory that each user grants an access token, at least one must have been granted via the registered Sponger instance so that requests to the LinkedIn REST API can be signed and LinkedIn can authenticate the caller. Thus one user's access token can be used to fetch another LinkedIn member's profile. However, a LinkedIn user's connections and posts are only included in the the profile being fetched if the access token used was granted specifically to that user. Even if this is the case, LinkedIn prevents browsing of connections, i.e. starting with one member and descending through her connections, then through the connections of a connection etc.
The cartridge is configured to trigger on URI pattern http://.*.linkedin.com/.*. It is assumed that a LinkedIn user's public profile URL will be used as the starting point for sponging their profile: http://uriburner.com/about/html/{your-LinkedIn?-public-profile-url}. For example:
We can take a look at the /fct variant of the primaryTopic object page: