Project Twitter

In this project you will develop an app that can post messages directly to the Twitter account of your company. You will also be able to read and show existing “tweets” from you company’s Twitter account.

Introduction to project

For this project to work, you will need Internet access. Make sure that at least one group member has an Android phone that has internet access, so that you can test and demo your app using that phone’s internet connection.

You will also have to create your company’s online profile from scratch. That means creating an email address for your company, creating a Twitter account, and then linking your app to that email address/Twitter account.

Be creative – choose a company profile that you think might want to communicate with their customers via twitter – a band, an entertainment company, a church, etc.

Project breakdown

Create new gmail/ymail account: in this step you will have to create a valid email address for you group’s company. I prefer Gmail accounts, but you can use Ymail as well.

Create new Twitter account using gmail/ymail account: use the email account you have just created to create a new Twitter account. Follow this Twitter account from your own Twitter profile.

Log into twitter as a developer: for you to create a link between your app and your new Twitter account, you must change this new Twitter account into a developer account. Go to developers.twitter.com and check out the steps.

Create a new app as a Twitter developer: when you are logged in as a Twitter developer you can “register” your own mobile apps for testing. Call your app (which you will develop soon!) PGDSWD-company name. This name should be the same as the Project name that you will use inside Eclipse.

Give read/write/direct message access: as an Twitter mobile developer, you must give your new apps read/write permissions, otherwise Twitter will not allow your app to read/write onto your company’s Twitter profile (make tweets, read tweets, etc.). Check out all the options under “Settings” on the developers.twitter.com website and give your app full permissions.

Generate a secret key and secret token for your app: each application you write as a Twitter developer must be signed with a unique Twitter secret key and token key. Generate a key and token for your app on the developers.twitter.com website.

In Eclipse

Create a new project.

Add permissions for internet access in the AndroidManifest file.

Add the jtwitter jar and signpost jars to the app's libs folder.

Add the jars to the build path / classpath

In JAVA

Import winterwell.jtwitter library

Create an OAuthSignpostClient object and put in your Twitter developer tokens/secret key details into the object.

Now create a Twitter object (winterwell.jtwitter.Twitter)

....

....

....

....

The big test for project Twitter

Read the last status update and show on screen

Write a status update to the twitter account