Blog Archives

Google Data API with RestSharp on WP7 Update

Special thanks to John Sheenan who pointed out an error in my code. First of all, calling Dispatcher.BeginInvoke is redundant since the callback action will be invoked on the main thread.

Secondly, there is a powerful deserialization feature in RestSharp. Create a simple class that will correspond to the deserialized JSON object: Read the rest of this entry

Google Data API with RestSharp on WP7

RestSharp is an open source REST client for .NET. I will use it for consuming Google Data API. You can easily install via the following NuGet command

Install-Package RestSharp

First step is creating an application in API Console and selecting services that you will be using. In this example, we will use the Tasks API. Once you create your project with the appropriate settings, you will need client_id and client_secret which is available on the API Access page. Read the rest of this entry

Google data API and OAuth: “invalid_grant” error

This extremely frustrating error can be remedied by simply re-requesting device code. You will need to authorize your app again, but at least it will work. You can also try changing the secret first, but in my case it did not work.