def share_link(site, title, url, img)
case site
when 'email'
"mailto:?to=&body=#{url},&subject=#{title}"
when 'twitter'
"https://twitter.com/intent/tweet?url=#{url}&text=#{title}"
when 'facebook'
"http://www.facebook.com/sharer/sharer.php?u=#{url}"
when 'vkontakte'
"https://vk.com/share.php?url=#{url}&title=#{title}&image=#{img}"
when 'odnoklassniki'
"https://connect.ok.ru/offer?url=#{url}&title=#{title}&imageUrl=#{img}"
when 'whatsapp'
"https://api.whatsapp.com/send?phone=&text=#{url}"
when 'viber'
"viber://forward?text=#{url}"
when 'sms'
"sms:?body=#{title} #{url}"
end
end