2013-04-21 70 views
0

我正在使用考拉宝石用put_object方法将图像发布到Facebook墙上。我遇到的问题是图像显示为墙上的缩略图(带有标题),而不是我期待的较大图像。当你点击缩略图时,我预计照片会在Facebook的照片查看器中弹出,但它只是指引我指定的图像的URL。这看起来更像我发布链接到墙上时的行为。我也试过使用post_picture没有成功。以下是我期待的截图:http://cl.ly/image/472a2H333z13如何使用考拉宝石发布图片?

我流的权限包括以下内容:

read_stream,offline_access,manage_pages,publish_stream,create_event,rsvp_event,sms,user_photos,friends_about_me,friends_status,friends_activities,friends_likes,friends_interests,read_insights,friends_photos 

下面的代码工作,但无法按预期 - 这里的图像如何张贴在使用截图put_object出现在时间轴上:http://cl.ly/image/1x3X1K0k2l2D

put_object('me', 'feed', :message => 'this is the message', :name => 'this is the caption', :picture => 'http://www.socialvolt.com/img/producttour/listen.png', :source => 'http://www.socialvolt.com/img/producttour/ssPublish.jpg') 

此代码不能在所有的工作:

put_picture('me', 'feed', :message => 'this is the message', :name => 'this is the caption', :picture => 'http://www.socialvolt.com/img/producttour/listen.png', :source => 'http://www.socialvolt.com/img/producttour/ssPublish.jpg') 

我也找不到任何区别:图片和:源。

任何人都可以帮我弄清楚我做错了什么吗?

回答

1

这是代码。

graph = Koala::Facebook::API.new(cookies[:acess_token]) 
begin     
    graph.put_picture(
        "https://dl.dropboxusercontent.com/u/71317935/banners/coy_copper.jpg", 
        "image/png", 
        {:message => "introduces Some information"} 
        ) 
rescue Exception => e 
    render :text => e.message and return 
end