1

在查看针对 Google 数据 API 进行身份验证的选项(使用 Picasa 网络相册)时,我提供了此处提到的选项: http ://code.google.com/apis/accounts/docs/GettingStarted.html

但是,我正在使用的应用程序是批处理应用程序(批量上传照片),这些似乎都面向具有用户交互的应用程序(即,它们似乎仅限于通过重定向到网络来获取用户密码页)。

同样,在多次上传后,服务器 API 会提示验证码确认,并阻止进一步上传,直到获得验证码。

我是否只是为了保护他们的带宽而受到强加的限制?

更新

这是进行插入的代码;为每个工作线程创建一个新的 com.google.gdata.client.photos.PicasawebService 实例。工作线程池被限制为大约 10-20 个线程,每个线程被分配上传单个图像(或创建相册):

    PicasawebService service = new PicasawebService(Constants.APPLICATION_AGENT);
    try {
        service.setUserCredentials(
            credentials.username(),
            credentials.password()
        );
    } catch (com.google.gdata.util.AuthenticationException e) {
        throw new AuthenticationException(e);
    }
4

1 回答 1

1

你试过这个吗?http://code.google.com/apis/gdata/docs/batch.html#Batch_API

于 2011-08-25T14:04:00.113 回答