Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # You usually need to configure the Twitter::Client object before invoking REST API calls through the library
- # Note: if you are configuring Twitter4R to use in a Rails (v >= 2.3.x) application then add your configuration
- # overrides to a twitter4r.rb initializer under config/initializer directory (or equivalent if you override its
- # path in your web app).
- Twitter::Client.configure do |conf|
- # We can set Twitter4R to use <tt>:ssl</tt> or <tt>:http</tt> to connect to the Twitter API.
- # Defaults to <tt>:ssl</tt>
- conf.protocol = :ssl
- # We can set Twitter4R to use another host name (perhaps for internal
- # testing purposes).
- # Defaults to 'twitter.com'
- conf.host = 'twitter.com'
- # We can set Twitter4R to use another port (also for internal
- # testing purposes).
- # Defaults to 443
- conf.port = 443
- # We can set proxy information for Twitter4R
- # By default all following values are set to <tt>nil</tt>.
- conf.proxy_host = 'myproxy.host'
- conf.proxy_port = 8080
- conf.proxy_user = 'myuser'
- conf.proxy_pass = 'mypass'
- # proxy protocol to use. Defaults to :http.
- conf.proxy_protocol = :http
- # OAuth settings for your application and the Twitter REST API URIs
- conf.oauth_consumer_token = "<YOUR APP'S CONSUMER TOKEN HERE>"
- conf.oauth_consumer_secret = "<YOUR APP'S CONSUMER SECRETE HERE>"
- # You shouldn't need to change the default URIs for the Twitter REST API unless Twitter changes them
- conf.oauth_request_token_path = "/oauth/request_token2"
- conf.oauth_access_token_path = "/oauth/access_token2"
- conf.oauth_authorize_path = "/oauth/authorize"
- # path to prefix URIs of REST API calls. Defaults to "".
- conf.path_prefix = "/v1"
- # :http, :https or :ssl supported. :ssl is an alias for :https. Defaults to :ssl
- conf.search_protocol = :ssl
- # port to connect to for the Twitter Search service. Defaults to 443.
- conf.search_port = 443
- # path to prefix URIs of Search API calls. Defaults to "".
- conf.search_path_prefix = ""
- # Set timeout in seconds for HTTP requests
- conf.timeout = 15
- # Set OAuth consumer token and secret in configuration
- conf.oauth_consumer_token = "<the OAuth consumer token for your application>"
- conf.oauth_consumer_secret - "<the OAuth consumer secret for your application>"
- end
Add Comment
Please, Sign In to add comment