title: How to post user generated photos to Facebook using Koala?
body: <p>I'm using the Koala gem in a Rails 3.2 app.</p>
  
  <p>I'm trying to post an action that includes a user generated photo to a Facebook application. According to <a href="https://developers.facebook.com/docs/opengraph/usergeneratedphotos/" rel="nofollow">FB's docs</a>, the url I need to post to is:</p>
  
  <pre><code>https://graph.facebook.com/uid/namespace:action?object=http://path/to/page&amp;image[0][url]=http://path/to/image.jpg&amp;image[0][user_generated]=true
  </code></pre>
  
  <p>If I test this manually using Facebook's debugger, it works perfectly. But I'm having trouble achieving this with Koala.</p>
  
  <p>I'm using the following method:</p>
  
  <pre><code>Koala::Facebook::API.new(app_token).put_connections( uid, namepsace:action, url )
  </code></pre>
  
  <p>If I use:</p>
  
  <pre><code>url = "http://path/to/page"
  </code></pre>
  
  <p>then the action is posted to Facebook correctly, but without the user generated photo.</p>
  
  <p>If I use:</p>
  
  <pre><code>url = "http://path/to/page&amp;image[0][url]=http://path/to/image.jpgimage[0][user_generated]=true"
  </code></pre>
  
  <p>I receive an error in the logs </p>
  
  <pre><code>#&lt;Koala::Facebook::APIError: OAuthException: (#3502) Object at URL http://path/to/page&amp;image[0][url]=http://path/to/image.jpg&amp;image[0][user_generated]=true has og:type of 'website'. The property 'object' requires an object of og:type 'namespace:object'.  (http response code: 404)&gt;
  </code></pre>
  
  <p>What is the correct way to construct the required post url using Koala? Or what is a good approach to begin debugging my current code? Or am I totally on the wrong track with this?</p>