EOFError: end of file reached issue with Net::HTTP

后端 未结 7 949
[愿得一人]
[愿得一人] 2020-11-30 21:54

I am using ruby-1.8.7-p302/Rails 2.3.11. I am trying to use FQL (Facebook API) to get stats for a link. Here\'s my code:

def stats(fb_post_url)
  url = BASE_         


        
7条回答
  •  醉话见心
    2020-11-30 22:20

    In Ruby on Rails I used this code, and it works perfectly:

    req_profilepic = ActiveSupport::JSON.decode(open(URI.encode("https://graph.facebook.com/me/?fields=picture&type=large&access_token=#{fb_access_token}")))
    
    profilepic_url = req_profilepic['picture']
    

提交回复
热议问题