The correct code for executing an MQL query in C # using the Google API Client Library should look something like this:
string API_KEY = "your-api-key-here"; FreebaseService service = new FreebaseService{ Key = API_KEY }; String query = "[{\"id\":null,\"name\":null,\"type\":\"/astronomy/planet\"}]"; FreebaseService.MqlreadRequest request = service.Mqlread(query); string response = request.Fetch(); Console.WriteLine (response);
Unfortunately, there is now some error with the client library, as it does not return any results. I will try to find out what is happening there.
Update: The problem is that the client library passes through the alt = json parameter, which the Freebase API cannot support. The Python client library has a way to disable this, but there is no way to do it in .Net. You can follow the open error for this in the Google Code project.
source share