Friendorb logo
What we do | Ad Exchange | Ad Exchange + Twitter & QR | FoursCrowd
Friendorb Blog » Multi-word searches with the Foursquare API

Multi-word searches with the Foursquare API

Posted December 10th, 2011

Share this:

When working on the first iteration of the FoursCrowd app, we encountered an odd situation. When searching for venues with multiple words, such as Jim’s Pizza, the API would return results only when searching for "Jim’s" or "Pizza", but not "Jim’s Pizza". The solution is simple; if a user searches for "Jim’s Pizza", you need to break up the query into single words separated with commas. In PHP, use this code:

$query = str_replace(" ", ",", $query);

This will break up the query into a format digestible by Foursquare. While easy to fix, it has the potential to irritate a lot of Foursquare app developers given the frequency of multi-word searches.

Blog articles

» 12.18.2011: FoursCrowd has it's own address!
» 12.10.2011: Multi-word searches with the Foursquare API
» 12.10.2011: See how busy your destination is with FoursCrowd
» 12.4.2011: 7 Reasons there's an education bubble - and it's going to burst
» 11.26.2011: Make your resume stand out: 3 steps to quantify your achievements
» 11.25.2011: Want to stand out at work? Automate, automate, automate!
» 11.19.2011: The best hope for housing
» 11.18.2011: Is Apple entering the plateau phase?
» 11.14.2011: How to use Friendorb
» 11.13.2011: Bulls make money, bears make money, and PIIGS get slaughtered
» 11.12.2011: Google+ pages are here
» 11.6.2011: Whatever happened to Diaspora, and what will become of Unthink?
» 11.5.2011: Electric cars will prove viable
» 11.4.2011: The impending Groupon disaster
» 11.3.2011: Facebook and Twitter are doomed: why you'll likely leave within two years
» 10.29.2011: Why Google+ Will Succeed
» 10.14.2011: Taking a look at Herman Cain's 9-9-9 tax plan
» 9.12.2011: Are we in a Web 2.0 Bubble? Yes!

Share this article


Updates
Ad Exchange
» Post a free ad
» Learn about the Ad Exchange
» Learn about the Ad Market
© 2012 Friendorb.com | Home | About us |Ad Exchange | FoursCrowd