2013-04-21 71 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