Getting Venues with FourSquare API
This example will demonstrate how to fetch certain venues with FourSquare API V2 using C#. The following is a link to a live demo: http://foursquare.azurewebsites.net/ Step 1 - Client Creation: In this example, I’m using a client library called SharpSquare and the following is the SharpSquare client creation. var assembly = Assembly.GetExecutingAssembly(); //todo: use XML instead var resourceName = "client_secrets.txt"; string clientId = null; string clientSecret = null; using (Stream stream = assembly.GetManifestResourceStream(resourceName)) { using (StreamReader reader = new StreamReader(stream)) { clientId = reader.ReadLine(); clientSecret = reader.ReadLine(); } } //Do not try to create the client without proper credentials if(!(string.IsNullOrEmpty(ClientId) || string.IsNullOrEmpty(ClientSecret))) SharpSquare = new SharpSquare(ClientId, ClientSecret); Setp 2 - Get Venues: The following method gets venues by category within a certain radius given a postal c...