Flickr, Foursquare, oauth, géolocalisation: notes
Voici quelques notes en vue de jouer avec la geolocalisation, et quelques API « géolocalisées ».
Flickr:
http://www.flickr.com/services/api/flickr.photos.search.html
- Nécessite une API key
- recherche par tags possible, donc possible de rechercher foursquare:venue=XXXX
- Limite de requêtes (par jour/heures/??): ???
OAuth:
- Zend_OAuth: incubator pour l’Instant
- oauth-php: http://code.google.com/p/oauth-php/
- Est-il possible de recupérer les infos de la DB (dev, staging, prod) avec symfony? (afin d’utiliser oAuthStore)
- Example spécifique avec foursquare: http://andrewmager.com/how-to-use-foursquare-api-with-oauth-and-php/
GeoIP:
- sur un shared hosting, le plus simple: http://pear.php.net/package/Net_GeoIP/
- À la limite, downloader pour customiser (car les require_once me semblent problématiques – warnings!!)
- DB free:
- http://www.maxmind.com/app/geolitecountry (binary format)
- http://www.maxmind.com/app/geolitecity (binary format)
- voir d’autres méthodes d’installation: http://www.maxmind.com/app/php
- Autres solutions:
- Google Gears geolocation: http://code.google.com/apis/gears/samples/hello_world_geolocation.html
- Nécessite l’autorisation du user (et l’installation de google Gears)
- Firefox seulement: http://fr.www.mozilla.com/fr/firefox/geolocation/
- safari: http://smithsrus.com/geo.html (browser geolocation)
- Google AJAX API: http://marcgrabanski.com/article/html5-geolocation-fallback-google-ajax-api
- Google Gears geolocation: http://code.google.com/apis/gears/samples/hello_world_geolocation.html
Foursquare API:
- http://groups.google.com/group/foursquare-api/web/api-documentation?_done=/group/foursquare-api%3F
- limite: pas encore définie
- http://api.foursquare.com/v1/venues pour chercher proche d’une latitude et longitude (+ keyword possible)
- Flickr Machine Tags: http://groups.google.com/group/foursquare-api/web/integrations?_done=/group/foursquare-api%3F
Lastfm:
- http://www.lastfm.fr/api/webauth for authentication (need an app key)
- http://www.matto1990.com/projects/phplastfmapi/
- geo.getEvents: http://www.lastfm.fr/api/show?service=270 – search by latitude and longitude
- le zend framwork a une partie implémentée: http://framework.zend.com/manual/en/zend.service.audioscrobbler.html mais pas la section geo…bouh!
Google Maps
- essayer un plugin jquery:
Mise à jour:
Voici une première version alpha d’un site qui utilise la geolocalisation… http://geo.fruitsoftware.com . Vos commentaires sont les bienvenus sur cet article.