require ‘rubygems’
require ‘hpricot’
require ‘open-uri’
doc = Hpricot(open(“http://graph.facebook.com/226723089703”))
@doc = doc.to_s.gsub(/“id.+?likes”:/,“”).gsub(“{”,“”).gsub(“}”,“”)
puts @doc
OR
require ‘rubygems’
require ‘nokogiri’
require ‘open-uri’
Get a Nokogiri::HTML:Document for the page were interested in…
doc = Nokogiri::HTML(open(‘https://graph.facebook.com/19292868552’))
puts doc
These two .rb files working fine on my local but giving error
" Invalid argument - http://graph.facebook.com/19292868552
(Errno::EINVAL)" On Server
if i remove line require ‘open-uri’ on my local error comes again on
local
Any Idea ?
Thanks in Advance …