<docbook><section><title>VirtCartConfigFoursquare</title><title>Foursquare Cartridge - Configuration Guidelines and Implementation Notes</title>Foursquare Cartridge - Configuration Guidelines and Implementation Notes
<para>The Sponger cartridge for <ulink url="https://foursquare.com/"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikiFoursquare</span></ulink> is written to the <ulink url="https://developer.foursquare.com/overview/"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikiFoursquare</span> REST API</ulink>.
 In order to use this API, the cartridge must be configured with a Foursquare OAuth token.
 To <ulink url="https://developer.foursquare.com/overview/auth">obtain an OAuth token</ulink>, register the Sponger as a Foursquare 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 /foursquare_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}/foursqaure_oauth/foursqaure_access_token.vsp</emphasis>.</para>
<bridgehead class="http://www.w3.org/1999/xhtml:h2">Registering the Sponger as a Foursquare Application</bridgehead>
<para>Before you can obtain access tokens for the cartridge, you first need to register the Sponger as a Foursquare application.</para>
<orderedlist spacing="compact"><listitem>Register the Sponger using the <ulink url="https://foursquare.com/oauth"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikiFoursquare</span> My OAuth Consumers</ulink>.
<figure><graphic fileref="VirtCartConfigFoursquare/1.png" /></figure> </listitem>
<listitem>Click &quot;Register a New Consumer&quot;.
</listitem>
<listitem>Specify application name, application website, callback url: <figure><graphic fileref="VirtCartConfigFoursquare/2.png" /></figure> </listitem>
<listitem>You have successfully registered your Sponger instance as a Foursquare application and you have a Client ID and a Client Secret on the <ulink url="https://foursquare.com/oauth"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikiFoursquare</span> My OAuth Consumers</ulink>: <figure><graphic fileref="VirtCartConfigFoursquare/3.png" /></figure> </listitem>
<listitem>Using the instruction from <ulink url="https://developer.foursquare.com/overview/auth.html"><span style="color: red">
      UNKNOWN tag:
      http://www.w3.org/1999/xhtml:nowikiFoursquare</span> API</ulink> get the Oath token for your application: <figure><graphic fileref="VirtCartConfigFoursquare/4.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="VirtCartConfigFoursquare/5.png" /></figure> </listitem>
<listitem>Find &quot;Foursquare&quot; and click on its link in order to edit its properties.
 Enter the OAuth token noted in the cartridge&#39;s &quot;Options&quot; field as values for options oauth_token: <figure><graphic fileref="VirtCartConfigFoursquare/6.png" /></figure> </listitem>
<listitem>Click &#39;Update&quot; to save the &quot;Options&quot; settings.</listitem>
</orderedlist><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*://.*.foursquare.com/.*.
 It is assumed that a Foursquare venue 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-Foursquare-venue-url}</emphasis>.
 For example:</para>
<orderedlist spacing="compact"><listitem>Access <ulink url="http://uriburner.com/about/html/https://foursquare.com/v/lexington-green/4bab8662f964a5203fb03ae3">http://uriburner.com/about/html/https://foursquare.com/v/lexington-green/4bab8662f964a5203fb03ae3</ulink> : <figure><graphic fileref="VirtCartConfigFoursquare/7.png" /></figure> </listitem>
<listitem>Click the primary topic value link &quot;Lexington Green&quot;: <figure><graphic fileref="VirtCartConfigFoursquare/8.png" /></figure></listitem>
</orderedlist><para> </para>
<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="VirtCartConfigFoursquare/9.png" /></figure></listitem>
</orderedlist><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><para> </para>
</section></docbook>