开发者

Twitter APIs for blackberry implementation

开发者_开发百科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.


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 and HTTPConnection for more info about HTTP Post requests.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜