Created
June 28, 2014 04:32
-
-
Save tektoh/832f4eb337401ac88699 to your computer and use it in GitHub Desktop.
20140628 - 旅好きエンジニアもくもく会 foursquare api をさわってみる。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
use Cake\Network\Http\Client; | |
public function fsq() { | |
$client = new Client(); | |
$url = 'https://api.foursquare.com/v2/venues/search'; | |
$res = $client->get($url, [ | |
'll' => '44.3,37.2', | |
'client_id' => 'クライアントID', | |
'client_secret' => 'シークレットキー', | |
'v' => '20131016' | |
]); | |
var_dump($res->body()); | |
} | |
?> | |
CakePHP3のHTTPクライアントクラスを使ってみた。 | |
認証不要なアクセス:https://developer.foursquare.com/overview/auth#userless | |
APIのバージョンとか: https://developer.foursquare.com/overview/versioning |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment