This is probably a terribly simple question but i can't figure out how to render an embedded tweet.
For simplicity, this is my controller:
class TweetsController < ApplicationController
def index
@tweet = twitter_client.oembed('527501479142109184')
end
end
And in the view if i just do the following it displays the object only:
<%= @tweet %>
i.e. #<Twitter::OEmbed:0x007fb878abc5d8>
On inspection this gives:
#<Twitter::OEmbed:0x007fb875cacd28 @attrs={:cache_age=>"3153600000", :url=>"https://twitter.com/HuayuanSong/statuses/527501479142109184", :height=>nil, :provider_url=>"https://twitter.com", :provider_name=>"Twitter", :author_name=>"Huayuan Song", :version=>"1.0", :author_url=>"https://twitter.com/HuayuanSong", :type=>"rich", :html=>"<blockquote class=\"twitter-tweet\"><p>Jeg kunne lide en video på <a href=\"https://twitter.com/YouTube\">@YouTube</a> <a href=\"http://t.co/hhhTvyJA6y\">http://t.co/hhhTvyJA6y</a> Obama: U.S. leading the way against Ebola spread</p>— Huayuan Song (@HuayuanSong) <a href=\"https://twitter.com/HuayuanSong/status/527501479142109184\">October 29, 2014</a></blockquote>\n<script async src=\"//platform.twitter.com/widgets.js\" charset=\"utf-8\"></script>", :width=>550}>
Obviously, this is terribly simple and i'm just using this a proof of concept type thing. Can somebody explain how i go from having the object to being able to display the actual embedded tweet?
thanks