Get redirect of a URL in Ruby

后端 未结 7 1205
盖世英雄少女心
盖世英雄少女心 2020-12-02 23:18

According to Facebook graph API we can request a user profile picture with this (example):

https://graph.facebook.com/1489686594/picture

Bu

相关标签:
7条回答
  • 2020-12-03 00:02

    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']
    
    0 讨论(0)
提交回复
热议问题