用于黑莓实现的 Twitter API
我正在尝试实现黑莓应用程序,它将帮助用户通过应用程序更新他的状态。
就像用户输入用户名、密码和状态一样,它将更新他在 Twitter 上的状态。
我看过 Twitter API 文档,但不明白如何开始。它有很多东西,比如应用程序注册和 OAuth 流程,我觉得非常模糊。
我也尝试过为黑莓使用一些外部 jar,但它的一些类/包不受支持,
twitter4j-core-2.1.1-SNAPSHOT.jar ----> Error preverifying class twitter4j.TwitterBase
java/lang/NoClassDefFoundError: java/io/Serializable
jtwitter.jar ---> VERIFIER ERROR org/json/Test.main([Ljava/lang/String;)V:
Cannot find class java/io/StringWriter
signpost-core-1.2.1.1.jar ---> Error preverifying class oauth.signpost.http.HttpParameters
java/lang/NoClassDefFoundError: java/util/Map
请朋友帮助我如何开始。如果可以分享任何支持黑莓的链接或jar,我们将不胜感激。
I am trying to implement the blackberry application which will help the user to update his status through application.
Its like user will enter the username, password and status it will update his status on twitter.
I have seen Twitter API docs but didnt understood how to start. It has many things like application registration and OAuth process which i felt very ambiguity.
I have also tried to use some external jar for blackberry but some of its classes/packages is not supported
twitter4j-core-2.1.1-SNAPSHOT.jar ----> Error preverifying class twitter4j.TwitterBase
java/lang/NoClassDefFoundError: java/io/Serializable
jtwitter.jar ---> VERIFIER ERROR org/json/Test.main([Ljava/lang/String;)V:
Cannot find class java/io/StringWriter
signpost-core-1.2.1.1.jar ---> Error preverifying class oauth.signpost.http.HttpParameters
java/lang/NoClassDefFoundError: java/util/Map
Please friends help me with how to start. it will be appreciated if any link or jar which support on blackberry can shared.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 10,000 英里视图,您首先需要使用模拟器 bin 目录中的 preverify.exe 工具预先验证您的 jar 文件。
然后您需要创建一个新项目,将项目类型从 CDLC -> 更改为库并将您的 twitter4j-*.jar 添加到其中。将此项目设置为主项目的参考(右键单击您的主项目,它位于属性中的某个位置)。接下来,配置主项目的构建路径并将 twitter4j-* 添加到构建路径。
为不同的库提供了带有 Eclipse 屏幕截图的详细视图,网址为 -
http://www .craigagreen.com/index.php?/Blog/blackberry-and-net-webservice-tutorial-part-1.html
更多信息 -
http://supportforums.blackberry.com/t5/Java-Development/Tutorial-How-To-Use-3rd-Party-Libraries-in-your-Applications/mp/177543
如果这是一条简单的推文,您最好只使用适当的参数执行 HTTP POST。
检查
URLEncodedPostData
和HTTPConnection
了解有关 HTTP Post 请求的更多信息。For a 10,000 mile view, you first need to preverify your jar files using the preverify.exe tool in the bin directory of your simulator.
You then need to create a new project, change the project type from CDLC -> Library and add your twitter4j-*.jar to it. Set this project as a reference (right click your main project and it's somewhere in the properties) to your main project. Next, configure build path for the main project and add twitter4j-* to your build path.
A detailed view with screenshots for eclipse is provided for a different library at -
http://www.craigagreen.com/index.php?/Blog/blackberry-and-net-webservice-tutorial-part-1.html
More info -
http://supportforums.blackberry.com/t5/Java-Development/Tutorial-How-To-Use-3rd-Party-Libraries-in-your-Applications/m-p/177543
If it's a simple tweet, you might be better of just doing a HTTP POST with the appropriate parameters.
Check
URLEncodedPostData
andHTTPConnection
for more info about HTTP Post requests.