Facebook Link app in Ruby on Rails

How do you attach a link in ruby ​​on rails, similar to attaching a facebook link, where you get the title and description of the link. Could you help me with the code?

+4
source share
1 answer

You can use mechanize

my_page=Mechanize.new my_page.get("http://google.com") my_page.page.title 

OR, you can use Pismo (https://github.com/peterc/pismo). Details of its use are available on github.

+2
source

Source: https://habr.com/ru/post/1304478/


All Articles