访问划线代码的Oauth时出错

时间:2012-06-14 04:27:13

标签: oauth-2.0

获取请求令牌... 线程“main”中的异常java.lang.Error:未解决的编译问题:     导入org.apache无法解析     无法解析Base64

at org.scribe.services.HMACSha1SignatureService.<init>(HMACSha1SignatureService.java:6)
at org.scribe.builder.api.DefaultApi10a.getSignatureService(DefaultApi10a.java:73)
at org.scribe.oauth.OAuth10aServiceImpl.addOAuthParams(OAuth10aServiceImpl.java:60)
at org.scribe.oauth.OAuth10aServiceImpl.getRequestToken(OAuth10aServiceImpl.java:43)
at org.scribe.examples.DiggExample2.main(DiggExample2.java:36)

1 个答案:

答案 0 :(得分:0)

你需要apache commons-codec jar。我可以从项目的POM文件依赖列表中看到它。

<dependencies>
    <dependency>
      <groupId>commons-codec</groupId>
      <artifactId>commons-codec</artifactId>
      <version>1.4</version>
    </dependency>

    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.8.1</version>
      <scope>test</scope>
    </dependency>