Reputation: 1339
Is there any good example that shows how to fill the application settings creating the settings for request?
this is code from google
using Google.Contacts;
using Google.GData.Contacts;
using Google.GData.Client;
using Google.GData.Extensions;
// ...
RequestSettings settings = new RequestSettings("<var>YOUR_APPLICATION_NAME</var>");
// Add authorization token.
//
// ...
ContactsRequest cr = new ContactsRequest(settings);
Do I have to specify the token that I get from oAuth request, and no more?
The value for YOUR_APPLICATION_NAME could be any string value?
Upvotes: 2
Views: 4199
Reputation: 15024
If you want to use OAuth 2.0 you have to set settings.OAuth2Parameters
to an instance of the OAuth2Parameters
class or use the RequestSettings(string applicationName, OAuth2Parameters parameters)
constructor.
The sample application at http://code.google.com/p/google-gdata/source/browse/trunk/clients/cs/samples/oauth2_sample/oauth2demo.cs shows how to instantiate a OAuth2Parameters
object.
Other RequestSettings
constructors allow you to use OAuth 1.0 and other authentication mechanisms.
Upvotes: 3