Skip to content

Commit 6ecd8a1

Browse files
committed
Update README.md with new information
1 parent 0a91877 commit 6ecd8a1

11 files changed

Lines changed: 46 additions & 39 deletions

README.md

Lines changed: 46 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Licensed under the Apache License, Version 2.0 (the "License"); you may not use
1212
http://www.apache.org/licenses/LICENSE-2.0
1313

1414
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
15-
15+
1616
## Pushing the app using Eclipse ##
1717

1818
### Step 1: Prerequisites ###
@@ -25,34 +25,23 @@ The source for this app is at GitHub so, you can either download the zip file or
2525
|-----------|----------------------------------------------------------------------------------------|
2626
| Git Clone:| `git clone https://github.com/ibmjstart/bluemix-java-sample-twitter-influence-app.git` |
2727

28-
#### • Download Cloud Foundry Plug-in ####
28+
#### • Download IBM Bluemix Plug-in ####
2929

3030
You will also need to download the Cloud Foundry plug-in for Eclipse. To do this, go to Eclipse and follow the instructions below:
3131

3232
1. Click: Help > Eclipse Marketplace...
33-
2. Search: "Cloud Foundry"
34-
3. Look for the item titled: "Cloud Foundry Integration for Eclipse x.x.x" (It should be the first listing)
33+
2. Search: "Bluemix"
34+
3. Look for the item titled: "IBM Eclipse Tools for Bluemix" (It should be the first listing)
3535
4. Click: Install
36-
37-
![logo](http://docs.cloudfoundry.com/images/sts/eclipse-marketplace.png)
36+
37+
![logo](images/bluemix_plugin.png)
3838

3939
### Step 2. Import the project into Eclipse ###
40-
40+
4141
Next, you will need to import the project into [**Eclipse**](https://www.eclipse.org/downloads/packages/eclipse-ide-java-ee-developers/keplersr2). Recommendation is to use the Eclipse IDE for Java EE Developers.
4242

4343
There are two ways you can get the source into Eclipse:
4444

45-
Option A. Import the Eclipse project by following these instructions:
46-
1. Start by cloning the repository, as described above
47-
2. Open Eclipse
48-
3. Select File->Import
49-
4. Under the header labeled "General", click "Existing Projects Into Workspace" and click Next
50-
5. Click "Browse" next to the first text field, and navigate to the cloned repository and find the folder labeled "app" and click ok.
51-
6. Under Projects you should now see a project called "twitter_influence_analyzer", make sure the checkbox next to the "twitter_influence_analyzer" project is checked and then click Finish
52-
7. You should now see the "twitter_influence_analyzer" project in your list of projects in Eclipse.
53-
54-
-OR-
55-
5645
Option B. Import the WAR File
5746
1. Navigate to https://github.com/ibmjstart/bluemix-java-sample-twitter-influence-app/releases
5847
2. Click the green button labeled "twitter_influence_analyzer.war" and that will download the WAR file.
@@ -61,6 +50,17 @@ Option B. Import the WAR File
6150
5. Scroll down to the "Web" section, expand that section and click WAR File then click Next.
6251
6. Click next and then Finish and the project should be imported into Eclipse
6352

53+
-OR-
54+
55+
Option A. Import the Eclipse project by following these instructions:
56+
1. Start by cloning the repository, as described above
57+
2. Open Eclipse
58+
3. Select File->Import
59+
4. Under the header labeled "General", click "Existing Projects Into Workspace" and click Next
60+
5. Click "Browse" next to the first text field, and navigate to the cloned repository and find the folder labeled "app" and click ok.
61+
6. Under Projects you should now see a project called "twitter_influence_analyzer", make sure the checkbox next to the "twitter_influence_analyzer" project is checked and then click Finish
62+
7. You should now see the "twitter_influence_analyzer" project in your list of projects in Eclipse.
63+
6464
### Step 3. Acquiring External and Public APIs ###
6565

6666
This app uses some external APIs. You need to register the app with Twitter and Klout to get the keys and tokens.
@@ -71,25 +71,21 @@ To access the Twitter API you need the consumer keys and access tokens, so you m
7171

7272
[More information on how to register the app with Twitter](registerTwitter.md)
7373

74-
#### • Klout API ####
75-
76-
You can register the app with Klout [here](http://developer.klout.com/member/). When you register with Klout, you'll get a Klout Key, which you can use to create a Klout Object as shown in the code.
77-
7874
#### • Google Maps v3 API ####
7975

8076
This app uses the Google Maps v3 APIs. Google APIs are open for the developers and you do not need to register the app with Google. Here's the [link](https://developers.google.com/maps/documentation/javascript/tutorial) for the Google Maps APIs.
8177

8278

8379
### Step 4. Configuring the Project Files###
8480

85-
There are two files that need to be edited. You can do this directly in Eclipse or using your favorite text editor.
81+
Edit the twitter4j.properties file with your API and access token credentials. You can do this directly in Eclipse or using your favorite text editor.
8682

8783
| Filenames | Path |
8884
|----------------------------------------------|-----------------------------------------------------------------|
89-
| `twitter4j.properties`<br>`klout.properties` | Local: `.../bluemix-java-sample-twitter-influence-app/app/src/` |
90-
| `twitter4j.properties`<br>`klout.properties` | Eclipse: `Project_Name > Java Resources > src` |
85+
| `twitter4j.properties` | Local: `.../bluemix-java-sample-twitter-influence-app/app/src/` |
86+
| `twitter4j.properties` | Eclipse: `Project_Name > Java Resources > src` |
9187

92-
The twitter credentials are entered in the file called `twitter4j.properties`. Simply copy and paste the credentials from your new app on twitter into the appropriate categories in the file. Additionally, the Klout API key is entered in the file called `klout.properties`.
88+
The twitter credentials are entered in the file called `twitter4j.properties`. Simply copy and paste the credentials from your new app on twitter into the appropriate categories in the file.
9389

9490
### Step 5. Deploying the app ###
9591

@@ -99,29 +95,31 @@ Make sure you are in the Java EE [perspective](http://help.eclipse.org/juno/inde
9995

10096
1. In the bottom window section, select the **Servers** tab. (Alternatively, you can click: `Window > Show View > Servers`)
10197
2. Right-Click inside the Servers panel and select `New > Server`
102-
3. Select, `Pivotal > Cloud Foundry` and click Next.
103-
4. Click Manage Cloud, then click Add
104-
5. Enter: `Bluemix` as the name, and `https://api.ng.bluemix.net` as the URL
105-
6. Click Finish, then click, OK
106-
7. Enter your login information for Bluemix in the email and password sections.
107-
8. From the URL dropdown menu, choose: Bluemix
108-
9. Click: Validate Account
109-
10. Click: Finish
98+
3. Select, `IBM > IBM Bluemix` and click `Next`.
99+
4. Enter your login information for Bluemix in the email and password sections.
100+
5. From the URL dropdown menu, choose: `IBM Bluemix`
101+
6. Hit `Next` and Bluemix will automatically validate your account credentials.
102+
7. Optional: Select the Organization within your Bluemix account that you would like to deploy to.
103+
8. Click: Finish
110104

111105
#### • Push the app ####
112106
1. Right-Click on the Bluemix server and click: `Connect` (Optional)
113107
2. Right-Click on the Bluemix server and select: `Add and Remove...`
114108
3. Select your Twitter Influence Analyzer project from the window on the left and click: `Add >`
115109
4. Click: `Finish`
116-
5. Enter a Name and select: Next
117-
6. Enter a THE SAME hostname that you used to register with Twitter. (e.g. `https://`**`myTwitterApp`**`.mybluemix.net`)
110+
5. Enter a Name for your app and select: `Next`
111+
6. Enter THE SAME subdomain that you used to register with Twitter. (e.g. `https://`**`myTwitterApp`**`.mybluemix.net`)
118112
7. Click: Finish
119113

120114
**CONGRATS!** Your app is now published to Bluemix.
121115
(Note: It can take a few minutes to upload everything and deploy all of the services.)
122116

123117
### Step 6. Create a Cloudant service ###
124118

119+
There are two ways to create and bind the cloudant service to your application.
120+
121+
Option A. Using the ACE UI:
122+
125123
1. In your web browser, go to: [https://ace.ng.bluemix.net](https://ace.ng.bluemix.net)
126124
2. Login and scroll down to the **Services** section
127125
3. Click: `Add a service`
@@ -130,6 +128,15 @@ Make sure you are in the Java EE [perspective](http://help.eclipse.org/juno/inde
130128
6. From the drop down menu, select your new app.
131129
7. Click: `Create`
132130

131+
Option B. Using the Eclipse plugin for Bluemix
132+
1. Double click your application under the IBM Bluemix server.
133+
2. Under the services selection, select the "add a service icon" in the top right.
134+
3. Search for cloudantNoSQLDB, and select the first option. Give it a name and pick the shared plan.
135+
![image](images/cloudant_service.png)
136+
4. Select `Finish`. This will create the service in your Bluemix organization.
137+
5. Under services, where your new service (with the name you specified) shows, drag the new service to "Application Services" on the right side of Eclipse. (Verify that you have the right application with the application name.)
138+
6. Click `Update and Restart` to restart your app with the new service.
139+
133140
### Step 7. Explore your app ####
134141

135142
1. Navigate to the main dashboard view in Bluemix
@@ -140,12 +147,12 @@ Make sure you are in the Java EE [perspective](http://help.eclipse.org/juno/inde
140147

141148
This is the home screen of the app. You can enter a twitter screen name in the text box and click the Analyze button to see their influence. You can also view any records saved in the database by clicking on the 'View Database' button.
142149

143-
![image](images/home.png)
150+
![image](images/home_page.png)
144151

145152
After entering the twitter name and clicking the Analyze button, you'll be able to see the influence analysis of that person on the left side. You will also see their last 10 tweets and any recent mentions in the tweets plotted on Google Maps (if there is geolocation data for a tweet).
146153

147-
![image](images/results.png)
154+
![image](images/search_results.png)
148155

149156
These are the records of the Influencers in the database. The user can also delete the records.
150157

151-
![image](images/saved_records.png)
158+
![image](images/saved_record.png)
173 KB
Loading
117 KB
Loading

images/bluemix_plugin.png

118 KB
Loading

images/cloudant_service.png

56.4 KB
Loading

images/home.png

-50.7 KB
Binary file not shown.

images/home_page.png

94.6 KB
Loading

images/results.png

121 KB
Loading

images/saved_record.png

72.3 KB
Loading

images/saved_records.png

-65.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)