<docbook><section><title>VirtCartConfigLinkedIn</title><title>LinkedIn Cartridge - Configuration Guidelines and Implementation Notes</title>LinkedIn Cartridge - Configuration Guidelines and Implementation Notes
<bridgehead class="http://www.w3.org/1999/xhtml:h2"> Introduction</bridgehead>
<para>The Sponger cartridge for <ulink url="http://www.linkedin.com"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikiLinkedIn</span></ulink> is written to the <ulink url="http://developer.linkedin.com/rest"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikiLinkedIn</span> REST API</ulink>.
 In order to use this API, the cartridge must be configured with a LinkedIn API key.
 To <ulink url="https://www.linkedin.com/secure/developer">obtain an API key</ulink>, register the Sponger as a LinkedIn application.
 Any application name can be used, for example &#39;<emphasis>Sponger_{your-virtuoso-host}</emphasis>&#39;.
 However the OAuth redirect URL must point to the /linkedin_oauth virtual path defined when the <ulink url="https://virtuoso.openlinksw.com/download/">Cartridges</ulink> VAD is installed, e.g.
 <emphasis>http://{your-virtuoso-host:port}/linkedin_oauth/linkedin_access_token.vsp</emphasis>.</para>
<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Registering the Sponger as a LinkedIn Application</bridgehead>
<para>Before you can obtain access tokens for the cartridge, you first need to register the Sponger as a LinkedIn application.</para>
<orderedlist spacing="compact"><listitem>Register the Sponger using the <ulink url="https://www.linkedin.com/secure/developer"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikiLinkedIn</span> Developer Network Application</ulink>.
<figure><graphic fileref="VirtCartConfigLinkedIn/lnk1.png" /></figure> </listitem>
<listitem>Click &quot;Add New Application&quot;.
</listitem>
<listitem>Specify company name, application name and application description: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk2.png" /></figure> </listitem>
<listitem>Next specify <ulink url="JavaScript">JavaScript</ulink> API Domain with value http://<span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:cname e.g.
 e.g., http://uriburner.com and specify application type and use.
 Additionally set live status:  </span></listitem>
<listitem>Specify contact email and phone.
</listitem>
<listitem>Specify OAuth Redirect URL.
 As noted above, the OAuth redirect URL must point to the /linkedin_oauth virtual path defined when the cartridges VAD is installed, e.g.
 <emphasis>http://{your-virtuoso-host:port}/linkedin_oauth/linkedin_access_token.vsp</emphasis>: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk4.png" /></figure> </listitem>
<listitem>Click &quot;Add Application&quot;.
</listitem>
<listitem>As result a notification for successfully created application should be displayed: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk5.png" /></figure> </listitem>
<listitem>To complete the process click &quot;Done&quot;.
</listitem>
<listitem>You have successfully registered your Sponger instance as a LinkedIn application and you have been granted an API key: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk6.png" /></figure> </listitem>
<listitem>Now go to your local Conductor at <ulink url="http://your-virtuoso-host:port/conductor">http://your-virtuoso-host:port/conductor</ulink> </listitem>
<listitem>Go to Linked Data -&gt; Sponger -&gt; Extractor Cartridges: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk7.png" /></figure> </listitem>
<listitem>Find &quot;LinkedIn&quot; and click on its link in order to edit its properties: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk8.png" /></figure> </listitem>
<listitem>Enter the API key and Secret Key noted in the cartridge&#39;s &quot;Options&quot; field as values for options consumer_key and consumer_secret.
 Set option consumer_name to match the registered application name: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk9.png" /></figure> <itemizedlist mark="bullet" spacing="compact"><listitem><emphasis>Note</emphasis>: you can also set accept_lang.
 This entry in the cartridge options is not created by default.
 <ulink url="LinkedIn">LinkedIn</ulink> 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 <ulink url="LinkedIn">LinkedIn</ulink>&#39;s choice of locale to be overridden.
 For ex: <programlisting>accept_lang=en-us
</programlisting></listitem>
</itemizedlist></listitem>
<listitem>Click &#39;Update&quot; to save the &quot;Options&quot; settings.
</listitem>
<listitem>Note: A shortcut for Granting an Access Token ( as described in the next section) is by placing the OAuth Redirect URL for ex.: <ulink url="http://example.com/linkedin_oauth/linkedin_access_token.vsp&lt;/code">http://example.com/linkedin_oauth/linkedin_access_token.vsp</ulink>&gt; directly in an browser address bar: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk3a.png" /></figure> <orderedlist spacing="compact"><listitem>Click &quot;Ok, I&#39;ll Allow it&quot;: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk3aa.png" /></figure></listitem>
</orderedlist></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Granting an Access Token</bridgehead>
<para>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:</para>
<orderedlist spacing="compact"><listitem>Go to http://{your-virtuoso-host:port}/sponger : <figure><graphic fileref="VirtCartConfigLinkedIn/lnk10.png" /></figure> </listitem>
<listitem>Click the LinkedIn button <figure><graphic fileref="VirtCartConfigLinkedIn/lnk11.png" /></figure> </listitem>
<listitem>Click the &quot;Ok, I&#39;ll Allow it&quot; button.
</listitem>
<listitem>As result a notification for successful OAuth access token generation should be displayed: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk12.png" /></figure></listitem>
</orderedlist><para> 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&#39;s access token can be used to fetch another LinkedIn member&#39;s profile.
 However, a LinkedIn user&#39;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.</para>
<para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">View the Retrieved Data</bridgehead>
<para>The cartridge is configured to trigger on URI pattern http://.*.linkedin.com/.*.
 It is assumed that a LinkedIn user&#39;s public profile URL will be used as the starting point for sponging their profile: <emphasis><ulink url="http://uriburner.com/about/html/">http://uriburner.com/about/html/</ulink>{your-<ulink url="LinkedIn">LinkedIn</ulink>-public-profile-url}</emphasis>.
 For example:</para>
<orderedlist spacing="compact"><listitem>Access <ulink url="http://uriburner.com/about/html/http://www.linkedin.com/in/kidehen">http://uriburner.com/about/html/http://www.linkedin.com/in/kidehen</ulink> : <figure><graphic fileref="VirtCartConfigLinkedIn/lnk13.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk14.png" /></figure> </listitem>
<listitem>Click the primary topic value link &quot;Kingsley Uyi Idehen&quot;: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk15.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk16.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk17.png" /></figure></listitem>
</orderedlist><bridgehead class="http://www.w3.org/1999/xhtml:h2">Alternative Follow-Your-Nose friendly view</bridgehead>
<para>We can take a look at the /fct variant of the primaryTopic object page:</para>
<orderedlist spacing="compact"><listitem>Click the <emphasis>Facets</emphasis> link from the footer section &quot;Alternative Linked Data Views&quot; of the page from above: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk18.png" /></figure> </listitem>
<listitem>Click &quot;Next&quot; to view the rest of the Attributes and their Values: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk19.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk20.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk21.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk22.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk23.png" /></figure> </listitem>
<listitem>Click &quot;Last&quot; to view the last page of Attributes and their Values: <figure><graphic fileref="VirtCartConfigLinkedIn/lnk24.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk25.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk26.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk27.png" /></figure> <figure><graphic fileref="VirtCartConfigLinkedIn/lnk28.png" /></figure></listitem>
</orderedlist><para> </para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Related</bridgehead>
<itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtSponger">Virtuoso Sponger</ulink> </listitem>
<listitem><ulink url="VirtConfigureCartridges">Configure Sponger Cartridges Guide</ulink> </listitem>
<listitem><ulink url="http://ode.openlinksw.com/">The OpenLink Data Explorer Extension</ulink> </listitem>
<listitem><ulink url="http://delicious.com/kidehen/goodrelations">Meshups (links and lookups across Web 2.0 Services and LOD Cloud</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSources">OpenLink-supplied Virtuoso Sponger Cartridges</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesVendorNonRDF">Complete list of supported Vendor-specific Non-RDF Data Formats</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesNonRDF">Complete list of supported Standard Non-RDF Data Formats</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesMeta">Complete list of supported Meta Cartridges</ulink> <itemizedlist mark="bullet" spacing="compact"><listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesMetaREST">Meta Cartridge Usage via REST Request</ulink> </listitem>
<listitem><ulink url="VirtSpongerCartridgeSupportedDataSourcesMetaRESTExamples">Parametrized Examples of Meta Cartridge Usage via REST Request</ulink></listitem>
</itemizedlist></listitem>
</itemizedlist></listitem>
</itemizedlist></section></docbook>