Tag Archives: yelp

Accessing the Yelp API with OAuth within Unity

I’m working on a side project at home which involved accessing the Yelp API with Unity which required the use of OAuth authentication and as the GitHub examples didn’t have any C# variations, I put one together myself with some help from Google.

The Yelp API is pretty straight forward despite the large number of parameters involved and the OAuth signature generation is handled by the outh project on code.google I found. As it only consists of a single source file, it makes it really simple to integrate in a project and use.

I had to make several changes to it as HttpUtility isn’t accessible in Unity and therefore I replaced all instances of HttpUtility.UrlEncode with WWW.EscapeURL which is part of Unity’s libraries and also added a bug fix that was purposed from the issues list from the project which can be found here.

A sample of the API call can be found after the jump.

Continue reading

Tagged , , , ,