Facebook graph api 从考拉返回哈希对象时出现奇怪的问题

Facebook graph api 从考拉返回哈希对象时出现奇怪的问题,facebook-graph-api,hash,sinatra,koala,Facebook Graph Api,Hash,Sinatra,Koala,我正在使用考拉宝石接收facebook提要的散列对象,但我遇到了一个问题 返回的哈希对象如下所示: {"post_id"=>"19292868552_356643851019175", "message"=>"Tune in tomorrow, January 11 at 12 PM PST / 3 PM EST / 8 PM GMT to join Facebook Live from the Consumer Electronics Show. We will be discus

我正在使用考拉宝石接收facebook提要的散列对象,但我遇到了一个问题

返回的哈希对象如下所示:

{"post_id"=>"19292868552_356643851019175", "message"=>"Tune in tomorrow, January 11 at 12 PM PST / 3 PM EST / 8 PM GMT to join Facebook Live from the Consumer Electronics Show. We will be discussing some of the best social applications and gadgets with people who built them. Watch the video and share your questions on Facebook Live - facebook.com/facebooklive.", "attachment"=>{"media"=>[{"href"=>"http://facebook.com/facebooklive", "alt"=>"", "type"=>"link", "src"=>"http://external.ak.fbcdn.net/safe_image.php?d=AQCkZ2fRUjE2ofi5&w=90&h=90&url=http%3A%2F%2Fprofile.ak.fbcdn.net%2Fhprofile-ak-snc4%2F195784_150984694912422_7311456_n.jpg"}], "name"=>"Facebook Live", "href"=>"http://facebook.com/facebooklive", "caption"=>"www.facebook.com", "description"=>"Facebook Live is Facebook’s official live video streaming channel, provide a deeper look into our...", "properties"=>[], "icon"=>"http://static.ak.fbcdn.net/rsrc.php/v1/yD/r/aS8ecmYRys0.gif", "fb_object_type"=>""}}
<hash-object>["attachment]["media"][0]["href"]
现在,当我尝试访问哈希对象的链接时,如下所示:

{"post_id"=>"19292868552_356643851019175", "message"=>"Tune in tomorrow, January 11 at 12 PM PST / 3 PM EST / 8 PM GMT to join Facebook Live from the Consumer Electronics Show. We will be discussing some of the best social applications and gadgets with people who built them. Watch the video and share your questions on Facebook Live - facebook.com/facebooklive.", "attachment"=>{"media"=>[{"href"=>"http://facebook.com/facebooklive", "alt"=>"", "type"=>"link", "src"=>"http://external.ak.fbcdn.net/safe_image.php?d=AQCkZ2fRUjE2ofi5&w=90&h=90&url=http%3A%2F%2Fprofile.ak.fbcdn.net%2Fhprofile-ak-snc4%2F195784_150984694912422_7311456_n.jpg"}], "name"=>"Facebook Live", "href"=>"http://facebook.com/facebooklive", "caption"=>"www.facebook.com", "description"=>"Facebook Live is Facebook’s official live video streaming channel, provide a deeper look into our...", "properties"=>[], "icon"=>"http://static.ak.fbcdn.net/rsrc.php/v1/yD/r/aS8ecmYRys0.gif", "fb_object_type"=>""}}
<hash-object>["attachment]["media"][0]["href"]
另外,当我在命令行中运行它时,它不会抛出任何错误。我对这个问题感到困惑,因为它没有任何意义(即在命令行中工作,而不是在Sinatra中工作)

我尝试过的事情:

JSON.parse(<hash-object>.to_json) # to re-create the Hash Object

提前感谢。

我甚至安装了ruby 1.9.2p320,而不是ruby 1.9.2p0,因为ruby 1.9.2p0中的sintra存在一些ruby问题,但问题仍然存在。这个问题是我犯的一个小错误,因为不是每个帖子都有包含“href”的媒体哈希