Just run into this issue, make sure you add http:// to the beginning of your endpoint otherwise oauth wont generate your calls properly. eg:
oauth = Twitter::OAuth.new(ctoken, csecret, :api_endpoint => "http://" + @endpoint) On 2 June, 01:59, empika <[email protected]> wrote: > Hey > > I asked support this question and got this answer back, I thought > others may find it useful: > > http://gist.github.com/421561 > > if ENV['APIGEE_TWITTER_API_ENDPOINT'] > @@twitter_api = ENV['APIGEE_TWITTER_API_ENDPOINT'] > else > # Get this value from Heroku. > # Once you have enabled the addon, boot up the 'heroku console' and > run the following: > # puts ENV['APIGEE_TWITTER_API_ENDPOINT'] > # this will spit out your correct api endpoint > @@twitter_api = "twitter-api.appXYZABC.apigee.com" > end > > # build the endpoint based on the add-on supplied configvar > @endpoint = 'http://' + @@twitter_api > > # initialize with sample variables > ctoken = 'your_consumer_token' > csecret = 'your_consumer_secret' > atoken, asecret = ["14142354-mykey", "mysecret"] > > oauth = Twitter::OAuth.new(ctoken, csecret, :api_endpoint => > @endpoint) > oauth.authorize_from_access(atoken, asecret) > client = Twitter::Base.new(oauth) > @user = client.user('heroku') # calls user/show on @heroku viaApigee > > -Edd -- You received this message because you are subscribed to the Google Groups "Heroku" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/heroku?hl=en.
