Google Apps Script で oAuth2.0 を使用する方法を知りたいです。
picasaで使いたいです。これは承認のための私のコードです:
var url = "https://accounts.google.com/o/oauth2/auth?redirect_uri=https%3A%2F%2Fscript.google.com%2Foauth2callback&response_type=code&client_id=" + My_Client_Id + "&approval_prompt=force&scope=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2F&access_type=offline&"
var option = {oAuthUseToken: "always", oAuthServiceName: "lh2"};
var response = UrlFetchApp.fetch(url, option);
ただし、承認は失敗します。
Google が picasa をリンクするための例を書いていることは知っています ( https://developers.google.com/apps-script/articles/picasa_google_apis )。ただし、これはクライアント ログイン用です。私がやりたいのは、いくつかの写真にいくつかのタグを付けることです。したがって、例は使用できません。