Tutorial Details
- Technology: PhoneGap + jQuery Mobile
- Difficulty: Advanced
- Completion Time: 60 - 90 Minutes
In this series, we will develop a Twitter client, called “Tweets”, using the jQuery Mobile and PhoneGap frameworks. This project will be deployed to Android and iOS environments as a native application. The user interface of Tweets will be built using jQuery Mobile and creating the native application will be done via PhoneGap. We will also use the PhoneGap Storage API to access native database functionality. All coding will be done with HTML and JavaScript utilizing jQuery, jQuery Mobile, and the PhoneGap libraries.
Tutorial Teaser
Our application will utilize the Twitter API via the jQuery ajax() calls. In this section, we will review the particular Twitter API methods used in the application.
The Social media site Twitter has a web based API for desktop or mobile applications to post data or query existing data in Twitter. The API has the REST (Representational State Transfer) architectural style and is accessible via the HTTP protocol. Detailed documentation for the API can be found in the official Twitter API docs.
In our sample application, we will use two API methods: user_timeline and search.
user_timeline
The user_timeline method returns the most recent tweets posted by a user. If the user whose tweets are requested has protected them, then you can access those tweets only if you are authenticated and the user who owns those tweets has accepted your follow request. To keep things simple, our application does not facilitate any means of authentication to Twitter. For this reason, we can access only those tweets that are not protected. Many organizations use Twitter to stay in touch with their customers. Therefore, to encourage followers, they do not protect their tweets. For example, many news organizations tweet breaking news in their Twitter account. Our sample application can be used to access the latest tweets by any Twitter account as long as it is not protected.
Get the Full Series!
This tutorial series is available to Tuts+ Premium members only. Read a preview of this tutorial on the Tuts+ Premium web site or login to Tuts+ Premium to access the full content.
Joining Tuts+ Premium. . .
For those unfamiliar, the family of Tuts+ sites runs a premium membership service called Tuts+ Premium. For $19 per month, you gain access to exclusive premium tutorials, screencasts, and freebies from Mobiletuts+, Nettuts+, Aetuts+, Audiotuts+, Vectortuts+, and CgTuts+. For the price of a pizza, you’ll learn from some of the best minds in the business. Become a premium member to access this tutorial, as well as hundreds of other advanced tutorials and screencasts.
