title: How to use oAuth 2.0 in Google Apps Script to authorize Picasa Web Album
body: <p>I want to know how to use oAuth2.0 in Google Apps Script.</p>
  
  <p>I want to use it in picasa.
  This is my code for authorizing: </p>
  
  <pre><code>var url = "https://accounts.google.com/o/oauth2/auth?redirect_uri=https%3A%2F%2Fscript.google.com%2Foauth2callback&amp;response_type=code&amp;client_id=" + My_Client_Id + "&amp;approval_prompt=force&amp;scope=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2F&amp;access_type=offline&amp;"
  var option = {oAuthUseToken: "always", oAuthServiceName: "lh2"};
  var response = UrlFetchApp.fetch(url, option);
  </code></pre>
  
  <p>However the authorizing is failed. </p>
  
  <p>I know Google has written an example for linking picasa ( <a href="https://developers.google.com/apps-script/articles/picasa_google_apis" rel="nofollow">https://developers.google.com/apps-script/articles/picasa_google_apis</a> ). However, it is for client login.
  What I want to do is put some tags in some photos. Therefore the examples can not be used.</p>