25.02.2015 Views

Introducing Spring Framework

Introducing Spring Framework

Introducing Spring Framework

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Chapter 17 ■ Be Social and Go Mobile<br />

Figure 17-13. Application Settings and the API, API Secret, Access Token, Access Token Secret keys with Read, Write and<br />

Direct Messages<br />

Figure 17-13 shows that all your keys have the access level required. This means that you can use the Twitter<br />

REST API to do several actions, such as posting a new status on Twitter.<br />

Let’s Tweet<br />

Because you have your keys now, it is time to start coding. First, you are going to create the twitter.properties file as<br />

shown in Listing 17-1.<br />

Listing 17-1. src/test/resources/twitter.properties<br />

twitter.apiKey=0OMWh8KM8CbcIiriPVhwB15Ul<br />

twitter.apiSecret=PeyKJUewMCWOUsEcJ0MWJHOrGxYUXJAmaFx2eiWEz0BNxYS0Qv<br />

twitter.accessToken=64771614-DyDKoisZpKYO6vIpLw6E4I872C1KZJS8vqjN1Mz0g<br />

twitter.accessTokenSecret=BsFCjZsmWtVJLnNJjLMzusAMbWtysSoE8TZjMO8J5a8lH<br />

244

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!