我相信JTwitter支持OAuth对开发者帐号进行身份验证,但是我不能让它们中的任何一个工作。
JTwitter文档说signpost是受支持的方法--但是我似乎找不到他们使用的OAuthSignpostClient类,即使在添加了signpost库之后:
OAuthSignpostClient client = new OAuthSignpostClient(JTWITTER_OAUTH_KEY, JTWITTER_OAUTH_SECRET, "oob");
Twitter jtwit = new Twitter("yourtwittername", client);
// open the authorisation page in the user's browser
client.authorizeDesktop();
// get the pin
String v = client.askUser("Please enter the verification PIN from Twitter");
client.setAuthorizationCode(v);
// Optional: store the authorisation token details
Object accessToken = client.getAccessToken();
// use the API!
jtwit.setStatus("Messing about in Java");有没有人把这个代码段写好了?
请帮帮忙
安迪
发布于 2010-06-11 15:52:27
OAuthSignpostClient类是JTwitter的一部分,与Twitter类位于相同的jar和包中。使用导入winterwell.jtwitter.OAuthSignpostClient来查找它。
如果找不到,请检查您的JTwitter版本(请参阅winterwell.jtwitter.Twitter中的version字段)。当前版本为1.6.3。早期版本可能没有路标类。
我希望这能有所帮助。
发布于 2010-06-10 02:38:20
使用SHA1校验和验证文件完整性。
http://code.google.com/p/oauth-signpost/downloads/detail?name=signpost-core-1.2.1.1.jar
也许这个解决方案对你有帮助。
https://stackoverflow.com/questions/2981866
复制相似问题