This was already answered correctly, but there’s a much simpler way:
res = Net::HTTP.get_response(URI('https://graph.facebook.com/1489686594/picture'))
res['location']
More Related Contents:
- Format a string containing Phone numbers
- SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
- How to understand nil vs. empty vs. blank in Ruby
- How do I get the current absolute URL in Ruby on Rails?
- SSL Error When installing rubygems, Unable to pull data from ‘https://rubygems.org/
- What is the easiest way to duplicate an activerecord record?
- redirect_to using POST in rails
- How can I avoid running ActiveRecord callbacks?
- Rails 4: List of available datatypes
- ActiveRecord.find(array_of_ids), preserving order
- In Ruby on Rails, how do I format a date with the “th” suffix, as in, “Sun Oct 5th”?
- How to create a deep copy of an object in Ruby?
- Rails: Access to current_user from within a model in Ruby on Rails
- What’s the best way to use SOAP with Ruby?
- Rails: ActiveRecord query based on association value
- Rails update_attributes without save?
- how to solve “ruby installation is missing psych” error?
- Detect MIME type of uploaded file in Ruby
- How can I find out the current route in Rails?
- Rails 4: assets not loading in production
- Using send_file to download a file from Amazon S3?
- How to use ActiveRecord in a ruby script outside Rails?
- Overriding a module method from a gem in Rails
- What does do in rails erb?
- Rails 3 – Speed up Console Loading Time
- Elastic Beanstalk Ruby/Rails need to install git so bundle install works.. but is not
- Ruby: Reading PDF files
- 403 Forbidden on Rails app w/ Nginx, Passenger
- How do I remove lines of data in the middle of a text file with Ruby
- How to fix “Your Ruby version is 2.3.0, but your Gemfile specified 2.2.5” while server starting