You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-28Lines changed: 50 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,27 +42,34 @@ Next, you will need to import the project into [**Eclipse**](https://www.eclipse
42
42
43
43
There are two ways you can get the source into Eclipse:
44
44
45
-
Option B. Import the WAR File
45
+
Option A. Import the WAR File (Preferred)
46
46
1. Navigate to https://github.com/ibmjstart/bluemix-java-sample-twitter-influence-app/releases
47
-
2. Click the green button labeled "twitter_influence_analyzer.war" and that will download the WAR file.
47
+
2. Click the green button labeled "twitter_influence_analyzer-1.2.war" and that will download the WAR file.
48
48
3. Open Eclipse
49
49
4. Then File->Import
50
50
5. Scroll down to the "Web" section, expand that section and click WAR File then click Next.
51
-
6. Click next and then Finish and the project should be imported into Eclipse
51
+
6. Select the war file from where it was downloaded. Ensure that `Target Runtime` is targeting IBM Bluemix.
52
+
7. Click `Next` and then `Finish` and the project should be imported into Eclipse
52
53
53
54
-OR-
54
55
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.
56
+
Option B. Import the Eclipse project by following these instructions: (Only if you want to modify the source code.)
57
+
1. Open Eclipse
58
+
2. Select File->Import
59
+
3. Under the header labeled "Git", click "Projects from Git" and click `Next`
60
+
4. Select `Clone URI` and click `Next`
61
+
5. Copy paste the clone URL into the next page. Hit `Next`
62
+
63
+

64
+
6. Select the Branch to clone (you should only need Master). Click `Next`
65
+
7. Name the destination directory. click `Next`
66
+
8. Check `Import Existing Projects` and click `Next`
67
+
9. Check the project, and click `Finish`
63
68
64
69
### Step 3. Acquiring External and Public APIs ###
65
70
71
+
**Your app will not work if you do not add your Twitter API keys and access Tokens to your environment variable.**
72
+
66
73
This app uses some external APIs. You need to register the app with Twitter and Klout to get the keys and tokens.
67
74
68
75
#### • Twitter v1.1 API ####
@@ -75,19 +82,7 @@ To access the Twitter API you need the consumer keys and access tokens, so you m
75
82
76
83
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.
77
84
78
-
79
-
### Step 4. Configuring the Project Files###
80
-
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.
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.
89
-
90
-
### Step 5. Deploying the app ###
85
+
### Step 4. Deploying the app ###
91
86
92
87
#### • Set up Bluemix Server ####
93
88
@@ -108,13 +103,28 @@ Make sure you are in the Java EE [perspective](http://help.eclipse.org/juno/inde
108
103
3. Select your Twitter Influence Analyzer project from the window on the left and click: `Add >`
109
104
4. Click: `Finish`
110
105
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`)
112
-
7. Click: Finish
106
+
6. Enter THE SAME subdomain that you used to register with Twitter. (e.g. `https://`**`myTwitterApp`**`.mybluemix.net`) Click `Next`
107
+
7. (Optional) Bind the Cloudant NoSQLDB service. If it is not already created, select the icon in the top right. (Refer to Option B of Creating a Cloudant Service for how to search and create the service.) Hit `Next`
108
+
8.**IMPORTANT:** Add your Twitter API credentials under environment variables. Right click, and select `Add`. Provide this information:
You may do this step later, but your application will fail without it.
121
+
122
+
9. Click: Finish. Your app will deploy to Bluemix. If you haven't already created and bound your cloudant service, please refer to Step 5: Create a Cloudant Service
113
123
114
124
**CONGRATS!** Your app is now published to Bluemix.
115
125
(Note: It can take a few minutes to upload everything and deploy all of the services.)
116
126
117
-
### Step 6. Create a Cloudant service ###
127
+
### Step 5. Create a Cloudant service ###
118
128
119
129
There are two ways to create and bind the cloudant service to your application.
120
130
@@ -130,13 +140,25 @@ Option A. Using the ACE UI:
130
140
131
141
Option B. Using the Eclipse plugin for Bluemix
132
142
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.
143
+
2. Under the services selection, select the "add a service icon" in the top right. (It is just an icon)
134
144
3. Search for cloudantNoSQLDB, and select the first option. Give it a name and pick the shared plan.
135
145

136
146
4. Select `Finish`. This will create the service in your Bluemix organization.
137
147
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.)
0 commit comments