Note that there are some explanatory texts on larger screens.

plurals
  1. POUploading a file to Facebook using Koala on Ruby on Rails
    primarykey
    data
    text
    <p><a href="http://horserumble.com/creating-facebook-events-with-koala#comment" rel="nofollow">I followed the following blogpost</a> to figure out how to create Facebook events remotely using my app. I've been having problems loading the images from my app, however, because I do not have images stored locally on my app, they are stored in AWS. </p> <blockquote> <pre><code> @graph = Koala::Facebook::GraphAPI.new(@token) picture = Koala::UploadableIO.new(@event.photo.url(:small)) params = { :picture =&gt; picture, :name =&gt; 'Event name', :description =&gt; 'Event descriptio :start_time =&gt; datetime, } </code></pre> </blockquote> <p>is the following code I am currently using to send pictures to Facebook when Facebook events are created on my app. The problem is, however, that Rails is throwing the error: No such file or directory - <a href="http://s3.amazonaws.com/ColumbiaEventsApp/photos/21/small.jpeg?1312521889" rel="nofollow">http://s3.amazonaws.com/ColumbiaEventsApp/photos/21/small.jpeg?1312521889</a>. </p> <p>Does anybody who's more experienced with Rails development know if there is a way for me to treat a URL like a path to a file? The UploadableIO class expects a path to a file, and I'm struggling to figure out if there's a way in Ruby to treat URL's like filepaths. The way that photos stored on the app can be loaded to Facebook is as follows: </p> <blockquote> <p>picture = Koala::UploadableIO.new(File.open("PATH TO YOUR EVENT IMAGE"))</p> </blockquote> <p>if that helps.</p> <p>I appreciate any new insights into this issue. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload