0

http://code.google.com/intl/sv-SE/apis/gdata/docs/auth/authsub.htmlhttp://code.google.com/intl/sv-SE/appengine/を見てい ます記事/java/retriving_gdata_feeds.html .

URLを生成するための私のコードは次のようになります

String nextUrl = "http://myapp.appspot.com/retrieveToken/";
String scope = "http://www.google.com/calendar/feeds/";
boolean secure = false;  // set secure=true to request secure AuthSub tokens
boolean session = true;
String authSubUrl = AuthSubUtil.getRequestUrl(nextUrl, scope, secure, session);

生成されたURLは次のようになります

https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fmyapp.appspot.com%2FretrieveToken%2F&scope=http%3A%2F%2Fwww.google.com%2Fcalendar%2Ffeeds%2F&secure=0&session=1

よさそうだ..しかし、URLをたどると、次のようなことが言われます

"http://appspot.com" is not registered.

(私はスウェーデン語でそれを取得します:)

ここで何が問題なのですか?

4

1 に答える 1

1

を選択したためsecure = false、アプリケーションを登録する必要はありません ( secure=0URL に含まれています)。*.appspot.comしかし、これはドメインに関連する問題だと思います。たとえば、nextUrlを別のものに変更すると"http://myapp.randomDomainHjYHBB4F.com/retrieveToken/"、新しい URL は次のようになるからです。

https://www.google.com/accounts/AuthSubRequest?next=http%3A%2F%2Fmyapp.randomDomainHjYHBB4F.com%2FretrieveToken%2F&scope=http%3A%2F%2Fwww.google.com%2Fcalendar%2Ffeeds%2F&secure=0&session=1

...そしてそれはうまくいきます!とても好奇心旺盛ではありませんか?

何が問題なのかはわかりませんが、簡単な回避策があります。アプリケーションを登録して、セキュア モードに切り替えることができます

于 2011-03-04T11:38:07.730 に答える