According to Facebook graph API we can request a user profile picture with this (example):
https://graph.facebook.com/1489686594/picture
Bu
You can use Net::Http and read the Location: header from the response
Location:
require 'net/http' require 'uri' url = URI.parse('http://www.example.com/index.html') res = Net::HTTP.start(url.host, url.port) {|http| http.get('/index.html') } res['location']