• Topic
  • Discussion
  • VOS.VirtCartConfigFoursquare(Last) -- Owiki? , 2018-04-13 12:05:49 Edit owiki 2018-04-13 08:05:49

    Foursquare Cartridge - Configuration Guidelines and Implementation Notes

    The Sponger cartridge for Foursquare is written to the Foursquare REST API. In order to use this API, the cartridge must be configured with a Foursquare OAuth token. To obtain an OAuth token, register the Sponger as a Foursquare application. Any application name can be used, for example 'Sponger_{your-virtuoso-host}'. However the OAuth redirect URL must point to the /foursquare_oauth virtual path defined when the Cartridges VAD is installed, e.g. http://{your-virtuoso-host:port}/foursqaure_oauth/foursqaure_access_token.vsp.

    Registering the Sponger as a Foursquare Application

    Before you can obtain access tokens for the cartridge, you first need to register the Sponger as a Foursquare application.

    1. Register the Sponger using the Foursquare My OAuth Consumers.



    2. Click "Register a New Consumer".
    3. Specify application name, application website, callback url:



    4. You have successfully registered your Sponger instance as a Foursquare application and you have a Client ID and a Client Secret on the Foursquare My OAuth Consumers:



    5. Using the instruction from Foursquare API get the Oath token for your application:



    6. Now go to your local Conductor at http://your-virtuoso-host:port/conductor
    7. Go to Linked Data -> Sponger -> Extractor Cartridges:



    8. Find "Foursquare" and click on its link in order to edit its properties. Enter the OAuth token noted in the cartridge's "Options" field as values for options oauth_token:



    9. Click 'Update" to save the "Options" settings.

    View the Retrieved Data

    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: http://uriburner.com/about/html/{your-Foursquare-venue-url}. For example:

    1. Access http://uriburner.com/about/html/https://foursquare.com/v/lexington-green/4bab8662f964a5203fb03ae3 :

    2. Click the primary topic value link "Lexington Green":


    Alternative Follow-Your-Nose friendly view

    We can take a look at the /fct variant of the primaryTopic object page:

    1. Click the Facets link from the footer section "Alternative Linked Data Views" of the page from above:


    Related