##Preview
Foursquare Widget for Dashing displays current checkins, total checkins and images of people checked in at a Foursquare venue.
You must be a venue manager for the venue for this widget to work.
##Dependencies
Add the following gem to the Gemfile:
gem 'httparty'
gem 'json'
and run bundle install
.
##Usage
To use the widget, copy foursquare.rb
to the /jobs
folder. Create a folder called foursquare
under /widgets
. Copy foursquare.coffee
, foursquare.html
and foursquare.scss
into /widgets/foursquare
.
Add the following code snippet to your dashboard .erb
file under /dashboards
:
<li data-row="1" data-col="1" data-sizex="1" data-sizey="1">
<div data-id="foursquare" data-view="Foursquare"></div>
</li>
Save the following image into /public
: https://raw.github.com/parthibanloganathan/dashing_widgets/master/public/foursquare.png
##Settings
To configure the widget to use your venue, you must have access to a venue manager account for your Foursquare venue.
- You can get the Venue ID of your venue from it's Foursquare page. For example,
4227a500f964a520c51f1fe3
inhttps://foursquare.com/v/columbia-university/4227a500f964a520c51f1fe3
is the Venue ID. - Follow the instructions on Foursquare's docs to get an access token, client id and client secret.
- Your Welcome page URL doesn't matter. You might want to use your Foursquare venue page as your Redirect URI (eg:
https://foursquare.com/v/columbia-university/4227a500f964a520c51f1fe3
). - Foursquare access tokens do not expire, so you can directly make the requests once via a browser. Refer to the section titled Token flow Client applications for more information.
- You can edit the width of the images in
foursquare.html
so that they fit your dashboard.