Skip to content

Commit

Permalink
Update OAuth example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
remi committed Apr 30, 2012
1 parent 7d2b6d4 commit c01ceda
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,26 @@ Using the `faraday_middleware` and `simple_oauth` gems, it’s fairly easy to us
In your Gemfile:

```ruby
gem "her"
gem "faraday_middleware"
gem "simple_oauth"
gem "her"
gem "faraday_middleware"
gem "simple_oauth"
```

In your Ruby code:

```ruby
# Create an application on `https://dev.twitter.com/apps` to set these values
TWITTER_CREDENTIALS = {
:consumer_key => "",
:consumer_secret => "",
:token => "",
:token_secret => ""
}

Her::API.setup :base_uri => "https://api.twitter.com/1/", :add_middleware => [FaradayMiddleware::OAuth => TWITTER_CREDENTIALS]
Her::API.setup({
:base_uri => "https://api.twitter.com/1/",
:add_middleware => [FaradayMiddleware::OAuth => TWITTER_CREDENTIALS]
})

class Tweet
include Her::Model
Expand Down

0 comments on commit c01ceda

Please sign in to comment.