R1ND3R
asked on
Examples on using Google Plus API
I am trying to output my post from my Google Plus account to another website. I have downloaded the Google .NET API dll's from http://code.google.com/p/google-api-dotnet-client/.
I've been trying to get my head around on how to use it. I know how to get a jSON output by using the Google API explorer here: http://code.google.com/apis/explorer. But since there is a .NET library from Google, I would like to use it to create a service.
Does anyone have any experience in getting data from Google+?
I've been trying to get my head around on how to use it. I know how to get a jSON output by using the Google API explorer here: http://code.google.com/apis/explorer. But since there is a .NET library from Google, I would like to use it to create a service.
Does anyone have any experience in getting data from Google+?
Use this link to get the help on google API or may be it will be helopful for you to develop any app
http://google-gdata.googlecode.com/svn/docs/Index.html
http://code.google.com/apis/gdata/articles/dotnet_client_lib.html
http://google-gdata.googlecode.com/svn/docs/Index.html
http://code.google.com/apis/gdata/articles/dotnet_client_lib.html
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is what I have done so far using code sample's from the Google API site.
But I am getting the following error on this line:
The error message is:
"The type initializer for 'Google.Apis.Json.Newtonso ftJsonSeri alizer' threw an exception."
private static IAuthorizationState GetAuthorization(NativeApplicationClient arg)
{
// Get the auth URL:
IAuthorizationState state = new AuthorizationState(new[] { TasksService.Scopes.Tasks.GetStringValue() });
state.Callback = new Uri(NativeApplicationClient.OutOfBandCallbackUrl);
Uri authUri = arg.RequestUserAuthorization(state);
// Request authorization from the user (by opening a browser window):
Process.Start(authUri.ToString());
Console.Write(" Authorization Code: ");
string authCode = Console.ReadLine();
Console.WriteLine();
// Retrieve the access token by using the authorization code:
return arg.ProcessUserAuthorization(authCode, state);
}
private void GetProfileInfo()
{
var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description);
provider.ClientIdentifier = "123456.apps.googleusercontent.com";
provider.ClientSecret = "<..someclientsecret..>";
var auth = new OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthorization);
var service = new PlusService(auth);
var result = service.People.Get("103697821787469756035");
}
But I am getting the following error on this line:
var service = new PlusService(auth);
The error message is:
"The type initializer for 'Google.Apis.Json.Newtonso
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
The code I have written one of my previous posts should help someone else who wants to start using Google+ API
http://www.googleplustips.com/resources/3332-NET-Library-Google-APIs-released.aspx