Skip to content

Instantly share code, notes, and snippets.

View hayesdavis's full-sized avatar

Hayes Davis hayesdavis

View GitHub Profile
#These instructions are for <= 0.1.3. Newer versions of Grackle will have a more
#fully-baked way of handling the Twitter API versions.
require 'grackle'
#Option 1: Just setup the hosts on your Grackle instance
#This will only change the hosts for this instance
client = Grackle::Client.new
client.api_hosts[:v1] = 'api.twitter.com/1'
client.api = :v1
#!/usr/bin/env ruby
# This script performs an OAuth authorized POST with multipart encoding to
# http://twitter.com/account/update_profile_image.json
#
# This code is primarily taken from my Grackle library's implementation at
# http://github.com/hayesdavis/grackle
#
# RUNNING THIS WILL CHANGE AN ACCOUNT'S PROFILE IMAGE. BE CAREFUL.
#