Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>After playing around a bit, I changed the <code>AccountType = "GOOGLE"</code>, and that worked. </p> <p>Thinking about it, that makes sense. I created the account using an existing email address. So in this situation, I was logging into the Google account, not the hosted account.</p> <p>Originally, I had not specified a <code>RequestFactory</code>, so the code looked like this:</p> <pre><code> _picasaService = new PicasaService(_appName); _picasaService.setUserCredentials(username, password); return _picasaService.QueryAuthenticationToken(); </code></pre> <p>This would cause a "Invalid User" error. I originally thought that I would need to set the <code>AccountType = "HOSTED_OR_GOOGLE"</code>, to get this to work. I had that in my head. So I added the <code>RequestFactory</code>, thinking that would solve my problems. </p> <p>Looking at the documentation for <a href="http://google-gdata.googlecode.com/svn/docs/folder16/AllMembers_T_Google_GData_Client_GDataGAuthRequestFactory.htm" rel="nofollow noreferrer">GDataGAuthRequestFactory</a>. It states that the <code>AccountType</code> is defaulted to <code>"GOOGLE_OR_HOSTED"</code>, so I tried this code:</p> <pre><code>GDataGAuthRequestFactory authFactory = new GDataGAuthRequestFactory("lh2", _appName); authFactory.AccountType = "GOOGLE_OR_HOSTED"; _picasaService = new PicasaService(authFactory.ApplicationName); _picasaService.RequestFactory = authFactory; </code></pre> <p>And that works. I have to conclude that the documented default value for <code>AccountType</code> of <code>"GOOGLE_OR_HOSTED"</code> is not correct.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload