Showing posts with label twitter api me. Show all posts
Showing posts with label twitter api me. Show all posts

Feb 26, 2013

TwAPIme updated to Twitter API v1.1

Hi, all

Yesterday I uploaded a beta version of one my projects, Twitter API ME v1.9. This version does not bring any new feature, but updates the project due to the changes in Twitter API v1.1.

The idea behind publishing an ealier build for the developers, is to give them a chance to test their apps as soon as possible. Any feedback is welcome! Here is the forum's link.

It is important to point out that Twitter API v1.0 will be shut down on March 5th... so TwAPIme v1.8 and older will stop working as well.

The download link is here.

See you in the next post...

Oct 6, 2011

Twitter API ME 1.8: Now with OAuth support

Hi, all

It's been a long time since my last post, but besides being a little bit busy, I also took a vacation, enjoying a trip to US, to visit some old friends. Great trip, by the way. But now, let's get back to work!

One thing that kept me busy during this time was the implementation of Twitter API ME 1.8. This new version is very special, because it comes with full support to OAuth. Since Twitter changed its Application Permission Model, requiring apps to use OAuth to have access to user's direct messages, Twitter API ME developers were not longer able to access DMs from their apps. Before v1.8, only xAuth was supported.

Other great thing about OAuth is that developers will no longer need to request xAuth permission to Twitter for their apps keys, in order to start working with the API. Since OAuth flow is more secure, Twitter trusts promptly any registered app, because there is no way for apps to get access to user's password. So, no more you have to wait days or until your app is done, so Twitter decides to grant you permission.

It is also important to point out, OAuth is available for all platforms supported: Java ME, Android and RIM.

Besides OAuth, Twitter API ME 1.8 comes with other news:

- Possibility to configure additional connection parameters for RIM platform.
- Improved RIM connection string solving the issue of when the devices is subscribed to BIS.
- Geo-located Trend search based on Yahoo! Where On Earth ID.
- Bug fixes and replacement of some deprecated Twitter API's resources.

I am really glad to have one more version of this successful project released. In addition, I would also like to thank everybody that contributed with the project, reporting bugs and requesting new features through our Express Support.

I strongly recommend you to migrate to v1.8 right away. So, download it now from here. I also prepared some sample apps to help developers to understand how to integrate OAuth into their apps. Just click here and have fun.

See you in the next post...

Jun 10, 2011

Twitter API ME v1.7 and TwAPIme for Android App v1.0 (open source)

Hi, all

Today, I am proud to announce that Twitter API ME v1.7 was finally released. This new version comes with a bunch of new functionalities, improvements and bug fixes. A special fact in this release is that all new functionalities implemented were requested by developers. All of them through our Express Support. So, thank you very much to those developers and their respective companies that contributed to this project.

As I said, this version comes with a great number of news. Check them out:

- Reply tweet
- Timeline of favorite tweets
- Favorite/unfavorite tweet
- User search
- User lookup
- Get friends and followers (full objects, not just id)
- Get friendship details between two users
- New attributes in MetadataSet class
- Bug fixes related to authentication using e-mail address instead of username

As you can see, you will have a lot of work to integrate those new functions into your app.

This version also comes with some remarks:

- From this version on the release's jar file is no longer preverified for Java ME and RIM platforms. It is not necessary, because you will do that when you build your application.

- You can now obfuscate your app with Twitter API ME's jar file without adding any rule to your obfuscator. No class is instantiated using reflection any more.

- HTTP Basic Authentication support was completely removed from source code.

Besides all those great news, there is one more thing (Apple like Tongue): TwAPIme for Android app. This an open source Twitter Android client app totally developed using Twitter API ME v1.7.

I expected to publish this app on Android Market at the same time v1.7 was released, but unfortunately, for time reason, it was not possible yet. Any way, you guys may already check out this good app. I believe it will be worthy for all developers. Find below some features available in this app:

- View Home, Mentions, DM and List timeline
- Post Tweet
- Send DM
- Reply and comment tweet
- Favorite/unfavorite tweet
- Retweet
- View user profile
- View user's lists
- View List's members
- Follow/unfollow user
- Block/unblock user
- Users search
- Report spammer

However, it comes with an important remark that must observed by everybody: Terms of Use

This source code is FREE ONLY for NON-commercial purposes. Actually, you can change it, add new features, fix bugs, etc. However, if you intend to release it as an app of yours, be aware it MUST be 100% FREE, besides making clear it is powered by Twitter API ME project and providing a link to website's project.

I recommend everybody to read the READ-ME.txt file contained in the release package of Twitter API ME and TwAPIme for Android.

So, here it goes the links to download the releases:

Twitter API ME v1.7
http://kenai.com/projects/twitterapime/downloads/directory/1.7

TwAPIme for Android v1.0
http://kenai.com/projects/twitterapime/downloads/directory/TwAPIme

So, I hope everybody enjoys all the news.

See you in the next post...

Feb 14, 2011

Twitter API ME 1.6: Finally

Hi all,

I would like to announce that Twitter API ME 1.6 has just been released. The main features present in this version are:
  • Retweets to me timeline
  • Retweets by me timeline
  • Tweets from list timeline
  • List management (e.g. create, update, memberships, subscriptions, etc)
  • Special character (*) in password bug fix
To download the new version, click here.

See you in the next post...

Feb 11, 2011

Soundtrckr: Internet Radio with Java ME

Hi all,

I would like to introduce an interesting app developed with Java ME and eSWT, which is part of the series where Nokia is inviting the coolest app developers to showcase and pilot their apps at Nokia Beta Labs. This app is called Soundtrckr.

Soundtrckr is the first Geosocial Internet radio. It has the largest fully licensed music catalog for Internet radio in the world, plus tons of social and location-based features to help you discover and share music that you can’t find anywhere else. See below some features available on Soundtrckr:
  • Listen to more than 10 million fully licensed songs
  • Create and share personal radio stations
  • Play music with friends in real time
  • Search your city for popular music and people with similar taste
  • Share your favorite stations on social networks
Since it is still in lab, Soundtrckr team is inviting developers to test its beta version in order to receive some feedbacks and then improve the app as much as they can. So, if you are interested in being part of this testing process, click here and find out. On the other hand, if you are just interested in enjoying all features by Soundtrckr, you can download it directly from Ovi Store.

Soundtrckr is available for Nokia N8 and other Symbian S^3 devices as well as S60 5th edition devices. Regarding S60, the version on beta labs requires JRT 2.1 and the Ovi's one, 1.4.

For further information Soundtrckr, access the app's page at Nokia Beta Labs.

Before I forget, Soundtrckr works with Twitter API ME in order to implement the functionalities related to Twitter. Cool, huh?

See you in the next post...

Oct 31, 2010

Twitter API ME 1.5

Hi all,

Quick post just to announce that Twitter API ME 1.5 has just been released.

In this new version, the following new features are available:
  • List of pending friends/followers request
  • Report spam
  • Retweets of me timeline
  • Trend Topics search
  • Tweet's entities
  • Retrieval of access token from UserAccountManager class
For further information on this new release, access www.twitterapime.com

See you in the next post...

Oct 17, 2010

Beyond Smartphones: Rich Applications and Services for the Mobile Masses

Hi all,

I would like to share you this presentation by Terrence Barr (@terrencebarr), at JavaOne 2010. Terrence introduces some tools that allow us to build rich and compelling smartphone-like applications. To demonstrate how to put all this technologies together, he develops a very interesting social networking mash-up app.

Terrence points out three technologies in his presentation:
To access the presentation, click here. It is a short one, but its content is valuable and really worths a view.

See you in the next post...

Oct 8, 2010

xAuth lib: OAuth made easy

Hi all,

Nowadays, important sites on web are growing their presence in mobile space. As usual, a quick way to go in this direction is releasing mobile versions of their sites. On the other hand, they also use to provide means so third-party sites and apps can access their content and services. For instance, many sites (or platforms), e.g., Google, Yahoo, Facebook, Twitter, etc, provide APIs, so that developer can build their products that rely on content from them.

To start accessing any content or service from one of those sites, you first need to authenticate with it. The site needs to recognize you so it can open their doors for you. The type of authentication may vary depending on each site. It is commom to encounter with Http Basic Auth, which is very easy to work with. However, most services are shifting to OAuth. A more secure auth mechanism that also avoids third-party sites have access to user's credentials. Recently, Twitter turned off its Http Basic Auth, to support only OAuth. Some sites still work with both, but it is matter of time so they keep only OAuth.

Due to some aspects of OAuth, its pure implementation is not feasible for desktop and mobile apps. This is related to a spec flow that demands your app to be redirected forth/back to/from a login page. It is kind of complicated to accomplish that in a mobile app, for instance. To avoid this step, they created xAuth, which is same as OAuth, but the login page flow.

An OAuth request is quite more complicated to perform, since it requires a signature for the request, which uses some hash algoritms and encoders. To now more about it, click here.

In my Twitter API ME project, I had to implement it, since as I previously said, Twitter turned off Http Basic Auth. However, my xAuth implementation was designed to be reused by other apps and frameworks. So, if you are looking for xAuth lib for your app, you are at the right place. So, to start it up, download the latest version of Twitter API ME at www.twitterapime.com.

Below I will put some code snippets that demonstrate how to get authenticated to Twitter and then post a tweet. After downloading the API, you will need to obtain your app's OAuth keys: consumer key and secret. They will be used to produce that signature I mentioned ealier. Those keys are provided by the site you want to connect with, after a quick subscription. Let's show some code:

01. HttpRequest req = new HttpRequest("https://api.twitter.com/oauth/access_token");
02. req.setMethod(HttpConnection.POST);

 
03. XAuthSigner signer = new XAuthSigner("", "");
04. signer.signForAccessToken(req, "", "");

05. try {
06.     HttpResponse resp = req.send();
07.     if (resp.getCode() == HttpConnection.HTTP_OK) {
08.        Token accessToken = Token.parse(resp.getBodyContent());

09.        req.close();

10.        req = new HttpRequest("http://api.twitter.com/1/statuses/update.xml");
11.        req.setMethod(HttpConnection.POST);
12.        req.setBodyParameter("status", "");
13.        req.setSigner(signer, accessToken);

14.        resp = req.send();
15.     }
16. } catch (IOException e) {
17.     e.printStackTrace();
18. } finally {
19.     try {
20.         req.close();
21.     } catch (IOException e) {}
22. }

Basically what we do is to sign each request, using XAuthSigner class, as we see in the lines 4 and 13. As soon as you get authenticated, you will obtain your access token (line 8). From this point on, every request will be signed using your keys and token. This token, in turn, can be stored for further use. It avoids requesting user's credentials next time and skip auth step.

I recommend before trying to access any site using xAuth, that read its documentation first, so you can see whether they require an additional procedure to work with xAuth. I am mentioned that, because Twitter, for instance, demands us to send an e-mail to them requesting privileges to use xAuth in our apps. Otherwise, it will not work. So be aware of that.

So, that's all guys! I hope it be useful for all of you.

See you in the next post...

Aug 29, 2010

Twitter API ME 1.4: New release!!!

Hi all,

I would like to inform that Twitter API ME 1.4 has just been released. This new version comes with new features and the correction of a bug that was preventing it to work on Blackberry devices. So Blackberry developers, you all are now welcome back to Twitter API ME.

The new features available on version 1.4 are:
  • Single Access Token auth
  • Geo-located tweets
  • Friends/Followers list
  • Update user profile
See below how easy is to use Single Access token and send a geo-located tweet.

Token = new Token("token_access", "token_secret");
Credential c =
  new Credential("usrnm", "conKey", "conSec", token);
UserAccountManager m =
  UserAccountManager.getInstance(c);
if (m.verifyCredential()) {
  GeoLocation l = new GeoLocation("+37.5", "+26.7");
  Tweet t = new Tweet(Geo-located tweet.", l);
  TweetER ter = TweetER.getInstance(m);
  t = ter.post(t);
}

Easy, huh?

For further information on Twitter API ME, please visit us at www.twitterapime.com.

See you in the next post...

Jun 14, 2010

Twitter API ME 1.3: xAuth support

Hi all,

I am here to announce that Twitter API ME 1.3 has been released just a few moments ago. This new version is mainly focused on xAuth support implementation. As you may know, Twitter API is shutting down the Http Basic Auth support on June 30th, 2010. This way, we had to run to get it done, otherwise, the API would work from this date. But we made it and now it is time to download to keep the things running.

Other important new feature is the fully support to UTF-8 characters. Now you can tweet in Russian, Japanese, Chinese, etc.

By the way, now you can also develop proprietary applications with Twitter API ME, because the binaries are now under LGPL v3.0 license. Cool, huh?

To download the new version, click here.

See you guys in the next post...

Apr 29, 2010

New Version of Twitter API ME: A bit earlier.

Hi all,

I am pleased to announce that Twitter API ME 1.2 has just came out of the oven, with some great new stuffs and some challenges in sight. This new version took a bit more than a month to be developed. As we had previously advanced, we had planned to release it just on June. However, we decided to advance it, since Kenai.com will be under migration process from next Friday (April 30th), for an undetermined period. The website will be still up, but it will be completely read-only. This way, we could not upload the new version after April 30th.

For those who do not know, this migration process of Kenai.com has to do with the deal between Oracle and Sun Microsystems. But do not worry! Even after April 30th, you can download the new version. :)

Now let's outline what is new in version 1.2:
  • Retweet
  • Direct message posting and retrieval
  • Friendship management, i.e., follow/unfollow and block/unblock
  • Access to Public, Home, User and Mentions timelines
  • Rate limit status access for Search API
A lot of stuff, huh? For instance, now you can send private messages to your friends, follow someone (or block if you do not like him/her), see all tweets from your friends (same as you see at Twitter's home) and the ones that mention you, etc. With version 1.2, you have a complete set of features that allow you to implement a full-featured Twitter application.

As the previous ones, this version was expressively tested and new test cases were also implemented for all new features to guarantee the quality. Now we have over 100 test cases, covering 91% of the code.

Regarding documentation, all new features are well documented in the source code (Javadoc) and there is also some code snippets in our Wiki page.

As I said in the beginning we already have a challenge in sight. Currently, Twitter API ME uses Http Basic Authentication method to authenticate to Twitter API. However, Twitter API team has defined a deadline (June 30th) to deactivate this support. They are requesting that every application move to OAuth, which they state to be more suitable for them, because it is more secure for the users. No problem, let's do it. Because of that, we have to rush to get it done ASAP.

I believe that's all. I hope you guys enjoy this new version and bring me comments, suggestions, ideas so we can continue improving this API, OK?

Ah!!! I almost forgot. Here it goes the download link. :)

See you in the nest post...

Apr 22, 2010

Twitter API ME 1.2: Almost done!

Hi all,

I decided to stop by to tell you guys that the new version of Twitter API ME, 1.2., is almost concluded. After the development and unit testing, we are now performing a final code review before release. This new version comes with great new features, e.g., timelines, direct messages, retweet, etc.

The release is scheduled for the beginning of June. So, stay tuned! To follow the development, check us on Twitter, @twiterapime.

See you in the next post...

Jan 5, 2010

Twitter API ME: New Year, New Version.

Hi all,

First of all, I would like to wish everybody a happy New Year. A 2010 full of health and achievements for all of us.

Besides the greetings, today I am here to announce the launch of Twitter API ME 1.1. Finally I have concluded this version. It took more time that I had planned, because I had to do some changes on certain parts of the API, in order to accommodate the new features. So, the version is already available in the website www.twitterapime.com in the section "Downloads\releases".

The new features from this new version are:
  • Tweet Posting (main one)
  • User authentication
  • Rate Limit Status access
  • Android 1.1 support for all the features
  • Some bug fixes and optimizations
For sure, the main new feature is Tweet Posting. Without posting tweets, Twitter does not make much sense, isn't it? So that's why we focused on providing this feature ASAP. See bellow how easy is to post a tweet from Twitter API ME 1.1:

Credential c = new Credential("username", "password");
UserAccountManager uam = UserAccountManager.getInstance(c);
if (uam.verifyCredential()) {
 TweetER ter = TweetER.getInstance(uam);
 Tweet t = ter.post(new Tweet("status message"));
}


That's all!!! Easy, isn't it?

Another important news from version 1.1 is the full support on Android 1.1. Now, you can also work with Twitter API ME on your Android applications.

To ensure the quality of the API, some unit tests have been implemented to ensure that no bug comes up after any change. Currently, we have 91 test cases covering 69% of the code. The objective for the next version is to increase this percentage as much as possible.

I hope to publish a new version of Sparrow application ASAP, so you guys can have a reference application.

So, give this new version a shot and download it now.

See you in the next post...

Nov 5, 2009

Twitter API ME: Sample App

Hi all,

Have you already downloaded Twitter API ME 1.0? Yes? Great!!! To help still more, I just developed a sample app, Sparrow, so you guys can have a better understanding on how this API works. For while, it only provides a functionality for searching tweets. For instance, you enter some filters and then the application shows the results.

I attempted to use as many features as possible available on Twitter API ME 1.0 in this app. The idea is to show all you can do with the API. As new features come available, I will update the app, implementing a respective functionality.

To download the app, click here. In the zip file, you will find the source, binaries and lib.

I hope it helps you a lot.

See you in the next post...

p.s: Now, you can also access the project's page on www.twitterapime.com.

Oct 29, 2009

Twitter API ME: Quick Tutorial

Hi all,

Such as I advanced in Twitter API ME's announcement post, here it goes some code snippets to demonstrate how to use this API. In fact, I will consider this post as a first tutorial on Twitter API ME that will help you to get started. First of all, I will show you how to create a simple query, submit it to Twitter Search API and then present the result. So you will not see much detail in this quick tutorial. Actually, I am thinking of dedicating more posts to explain each class in detail. But for now, let's just see how it works.

Twitter API ME, such as Twitter API, is splitted into two main components: Search and REST APIs. Twitter API ME 1.0 just supports Search API services. So, for now, you will work with the package com.twitterapime.search only. This package contains all the classes that are responsible for submitting a query to Twitter and then getting the result. These are the main classes:
  • Query
  • QueryComposer
  • SearchDevice
  • Tweet
Query class wraps a string that represents a query, which is submitted to Twitter Search API. This query is in URL format. To compose a query, the developer can use the QueryComposer class. This class provides methods for most types of filters/parameters supported by Twitter Search API. For instance, QueryComposer.from(String) is used to create a query to search for all tweets submitted by a certain user; QueryComposer.contain(String), search for tweets that contain a given word, and so on.

It is also possible to create a query with more than one parameter. In this case, you can concatenate two queries, by calling the method QueryComposer.append(Query, Query). It will return a new query object with both queries concatenated.

SearchDevice class is the entry point to Twitter Search API. This class provides the methods to submit a query to Twitter and retrieve the search's result. Its use is very straighforward: create a query and pass to SearchDevice.searchTweets(Query) method. The return of this method is an array of Tweet objects. Tweet class represents a tweet: a Twitter's message.

To retrieve the tweet's info (e.g. message, author, publish date, etc.), just use one of its "get" methods (e.g. Tweet.getString(String)), passing one of the attributes defined by MetadataSet interface. The Tweet's attributes are represented by the contants that start with TWEET prefix, e.g., MetadataSet.TWEET_CONTENT.

Now let's show some code. This example demonstrates how to search for all the tweets sent by a given user (e.g. me) and that contains the word "F1" (we will get a lot of results :-)):

...
SearchDevice sd = SearchDevice.getInstance();
Query q1 = QueryComposer.from("ernandesmjr");
Query q2 = QueryComposer.contain("F1");
Query q3 = QueryComposer.append(q1, q2);
Tweet[] result = sd.searchTweets(q3);
for (int i = 0; i < 0; i++) {
 list.append(result[i].getString(MetadataSet.TWEET_CONTENT), null);
}
...

Let's search for tweets that references or mentions a certain person. In additional, we will request to Twitter Search API to return up to 5 tweets:

...
SearchDevice sd = SearchDevice.getInstance();
Query q1 = QueryComposer.reference("ernandesmjr");
Query q2 = QueryComposer.resultCount(5);
Query q3 = QueryComposer.append(q1, q2);
Tweet[] result = sd.searchTweets(q3);
for (int i = 0; i < 0; i++) {
 System.out.println(result[i].getString(MetadataSet.TWEET_CONTENT));
 System.out.println(result[i].getString(MetadataSet.TWEET_PUBLISH_DATE));
}
...

It is easy, isn't it? The rest, for while, is just a matter of discovering the others methods available in thoses classes. But the main use is what is described in these code snippets. More details you can check on javadoc.

See you in the nest post...

Twitter API ME: The announcement.

Hi all,

In the last few weeks, as soon as I became a Twitter's user, I had an idea to create an API so that we could develop applications to get access to Twitter's information. This work started on studying the API from Twitter API website, in order to see how the things work. I got surprised how easy is to access this service - very straightforward. In a nutshell, the API is based on accessing a URL and passing some parameters and get the response. For some API's services, authentication is required, but it is not a big deal to manage.

Basically, Twitter API is splitted into two parts: Search and REST API. Search API is responsible for providing a search mechanism of tweets (a Twitter message), by submitting a query with some parameters (filters), e.g., search for all tweets submitted by a given user or that contains a given word/phrase. The REST API, in turn, provides means to submit tweets to Twitter.

So after studying the API, I started to design and code an API so that we could have access to Twitter API from our mobile devices. The idea is to have an structure such as Twitter API, with those two main components: one for search and other for submitting content.

This API was designed using just plain old Java language, so that we could have an API to run on many platforms. In other words, this API intends to run on any Java platform (e.g. Java ME, Android, Java SE, etc.). It is possible, because the interface for the developers is pure Java, however, the concrete classes are platform dependent.

Due to my short free time, until this moment, I have implemented the Search API services and for Java ME platform only. However, the API is totally functional and ready to be used. I am already planning to implement REST API and a support for Android. It is expected for the next release. In the meanwhile, download and try it. It is free! It is upon GPL-2.0 license.

You guys can download the binaries, source code and documentation from projects's website, which is hosted on Kenai project website. For while, the SVN repository is not available. I am still working on somethings, but soon you guys will be able to check out the code directly to your IDE, OK? In additional, you guys can also report bugs/improvements on our issue tracking tool (JIRA).

I hope you guys like this project. It is getting cool! In the next posts, I will post some code snippets on how to use the API.

See you in the next post...