PHPackages                             microcore/foursquare - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. microcore/foursquare

ActiveLibrary[Framework](/categories/framework)

microcore/foursquare
====================

Foursquare Api Client

1.0.0(10y ago)08GPLv3PHPPHP &gt;=5.5.9

Since Jun 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/korchevskiy/foursquare-api)[ Packagist](https://packagist.org/packages/microcore/foursquare)[ Docs](http://micro-core.tk)[ RSS](/packages/microcore-foursquare/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)DependenciesVersions (2)Used By (0)

### Usage

[](#usage)

This library wrappers for php applications to make requests to both public and authenticated-only resources on Foursquare.

#### Querying the API

[](#querying-the-api)

```
    $Foursquare = new \Foursquare\Client\FoursquareApi('", "');
    $response = $Foursquare->getPublic("venues/search",array("near"=>"Montreal, Quebec"));
    pr($response);
```

#### Authenticating the user (simple)

[](#authenticating-the-user-simple)

```
// Generates an authentication link for you to display to your users
// (https://foursquare.com/oauth2/authenticate?...)
$auth_link = $Foursquare->getRedirectUrl();

// Converts an authentication code (sent from foursquare to your $redirect_url) into an access token
if ( ($response = $Foursquare->getTokenByCode($_REQUEST['code'])) && !isset( $response['error'] ) && isset( $response['access_token'] ) ) {
    $token = $response['access_token'];
    $Foursquare->setAccessToken($token);
}
```

#### Authenticating the user in MicroCore App

[](#authenticating-the-user-in-microcore-app)

```
$connect = new \Foursquare\Client\FoursquareConnect($this);
if ( !empty($this->request['code']) ) {
    if ( $this->request['state'] ) {
        $base = explode( '-', $this->request['state'] );
        if(count($base) == 2){
            $this->request['state'] = $_REQUEST['state'] = $base[1];
            try {
                $connect->finishLogin($base[0]);
            } catch( Exception $error ) {
                $msg = $error->getMessage();
                switch( $msg ) {
                    default:
                        $this->View->set('error', 'Error 999990. No data received from foursquare, please register');
                        break;
                    case 'API_NOT_SET_UP':
                        $this->View->set('error', 'Error 999991. No data received from foursquare, please register');
                        break;
                    case 'NOT_REMOTE_MEMBER':
                        $this->View->set('error', 'Error 999992. No data received from foursquare, please register ');
                    break;
                    case 'CREATION_FAIL':
                        $this->View->set('error', 'Error 999993. No data received from foursquare, please register ');
                    break;
                    case 'CREATION_FAIL_TOKEN':
                        $this->View->set('error', 'Error 999994. No data received from foursquare, please register ');
                    break;
                    case 'MERGE_SOCIAL_ACCOUNT':
                        $this->View->set('error', 'Error 999995. Another user already linked his profile with this Google Account');
                    break;
                    case 'SOCIAL_NETWORK_ERROR':
                        $this->View->set('error', 'Error 999996. Foursquare has returned error');
                    break;
                }
                $this->View->errorAction('custom_error');
            }
        } else {
            $this->redirect("/login");
        }
    } else {
        $connect->finishConnection();
    }
} else {
    $connect->redirectToConnectPage();
}
$this->redirect("/login");
```

###  Health Score

25

—

LowBetter than 36% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3675d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/19776920?v=4)[korchevskiy](/maintainers/korchevskiy)[@korchevskiy](https://github.com/korchevskiy)

---

Top Contributors

[![korchevskiy](https://avatars.githubusercontent.com/u/19776920?v=4)](https://github.com/korchevskiy "korchevskiy (3 commits)")

---

Tags

framework

### Embed Badge

![Health badge](/badges/microcore-foursquare/health.svg)

```
[![Health](https://phpackages.com/badges/microcore-foursquare/health.svg)](https://phpackages.com/packages/microcore-foursquare)
```

###  Alternatives

[hemp/presenter

Easy Model Presenters in Laravel

247608.3k1](/packages/hemp-presenter)[pestphp/pest-plugin-stressless

Stressless plugin for Pest

68943.9k18](/packages/pestphp-pest-plugin-stressless)[wpstarter/framework

The WpStarter Framework - Laravel Framework for WordPress

1610.2k5](/packages/wpstarter-framework)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
