Here is my code
domain = \'http://www.google.com\'
url = URI.parse \"https://graph.facebook.com/fql?q=SELECT%20url,normalized_url%20FROM%20link_stat%20WHERE%20ur
There are several oddities in your code. The main is: since you use SSL
you are to aknowledge HTTP.start
about with :use_ssl => url.scheme == 'https'
. HTTP.Get
constructor awaits for an URI
, not the path. The summing up:
domain = 'http://www.google.com'
url = URI.parse("https://graph.facebook.com/fql?q=SELECT%20url,normalized_url%20FROM%20link_stat%20WHERE%20url='#{domain}'")
req = Net::HTTP::Get.new url
res = Net::HTTP.start(url.host, url.port,
:use_ssl => url.scheme == 'https') {|http| http.request req}
puts res
Gives:
#