Twitter script since oAuth

I had a script working with basic authinecation pulling from out local
database and sending updates to twitter, about 12 a month. Not any
crazy traffic. Since Aug 31st they turned off basic authineciton. Ive
tried to implement the follow and it appears to work (pulls back a json
file per the example. Tested this by puts the line to the screen.

I can not, figure out how to post an update to it. Im fairly new (well
not new, but dont do it full time) to programming and I must be missing

Here is the script I am following. Bottom of page for the ruby script,
just cant figure out how to pst an update to the timeline.

# Exchange your oauth_token and oauth_token_secret for an AccessToken
def prepare_access_token(oauth_token, oauth_token_secret)
  consumer ="APIKey", "APISecret",
    { :site => "",
      :scheme => :header
  # now create the access token object from passed values
  token_hash = { :oauth_token => oauth_token,
                 :oauth_token_secret => oauth_token_secret
  access_token = OAuth::AccessToken.from_hash(consumer, token_hash )
  return access_token

# Exchange our oauth_token and oauth_token secret for the AccessToken
access_token = prepare_access_token("abcdefg", "hijklmnop")
# use the access token as an agent to get the home timeline
response = access_token.request(:get,

You can use the twitter gem to post once you have the oauth token or
look at this gem that does both

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs