1. Go to this page and download the library: Download ner0tic/foursquare-api library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ner0tic / foursquare-api example snippets
$fs = new \Foursquare\Client();
$checkins = $fs->api('checkins')->recent(); // recent($id,max=10)
foreach($checkins as $checkin) {
echo $checkin; // $checkin->timestamp.' '.$checkin->getVenue()->getName()
}
$fs = new \Foursquare\Client();
$fs->setAuthClientId($id);
$fs->setAuthHttpPassword($pass);
$fs->setAuthUrlToken($token);
$fs->setAuthHttpToken($token);