views:

83

answers:

1

This is crazy, but I'm stumped! Once my user has logged into twitter via OAuth how do I determine their username using grackle?

@twitter = Grackle::Client.new(:auth => {
  :type => :oauth,
  :consumer_key => consumer_key,
  :consumer_secret => consumer_secret,
  :token => @access_token.token, 
  :token_secret => @access_token.secret
})

username = @twitter.something_here?
+1  A: 

Try looking on here:

http://apiwiki.twitter.com/Twitter-REST-API-Method:-account%C2%A0verify_credentials

It tells you how via the main api how to get the current user information. You could look into hooking this up through Grackle.

Joe

Joe Simpson
Perfect! Not a moment too soon :P
JP