Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Facebook has decent documentation about uploading to a group. You can post a picture object to the group API</p> <pre><code>https://developers.facebook.com/docs/reference/api/group/ </code></pre> <p>Make sure to read the above link and read the CREATE section, also any needed permissions, etc. You code using the latest php-sdk should look similar to this...</p> <pre><code>//IF FILE UPLOAD if ((($_FILES["file"]["type"] == "image/gif") || ($_FILES["file"]["type"] == "image/jpeg") || ($_FILES["file"]["type"] == "image/png") || ($_FILES["file"]["type"] == "image/pjpeg")) &amp;&amp; ($_FILES["file"]["size"] &lt; 2000000)){ if ($_FILES["file"]["error"] &gt; 0){ $error .= "Return Code: " . $_FILES["file"]["error"] . "&lt;br /&gt;"; }else{ echo "Upload: " . $_FILES["file"]["name"] . "&lt;br /&gt;"; echo "Type: " . $_FILES["file"]["type"] . "&lt;br /&gt;"; echo "Size: " . ($_FILES["file"]["size"] / 1024) . " Kb&lt;br /&gt;"; echo "Temp file: " . $_FILES["file"]["tmp_name"] . "&lt;br /&gt;"; $args = array('message' =&gt; $_GET['title']); $args['image'] = '@' . realpath($_FILES["file"]["tmp_name"]); $data = $facebook-&gt;api('/me/photos', 'post', $args); $entry-&gt;details = $data['id']; } } </code></pre> <p>The important part is:</p> <pre><code>$data = $facebook-&gt;api('/me/photos', 'post', $args); </code></pre> <p>which uploads to the user, you can change this to post to a group something like this...</p> <pre><code>$data = $facebook-&gt;api('/GROUP_ID/photos', 'post', $args); </code></pre>
    singulars
    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.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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