28

Facebook offers a new functionality for groups. Now it is possible to post also files within a group. (http://mashable.com/2012/05/10/facebook-groups-3/)

I am trying to query now the files using the Graph API but on the documentation site there are only 4 urls described. "docs", "members", "feed", "picture". When I read the "feed" path I will not get file postings.

Is there a hidden path? I also found no new permission.

Anyone has any idea?

I have searched for a solution on several internet pages but there are only descriptions on how to read and post photos, which is described in the document.

Is there nobody writing an app where you can upload files to groups?

Rahil Arora
  • 3,644
  • 3
  • 26
  • 43
kafbuddy
  • 304
  • 2
  • 5

2 Answers2

1

try this, this might be helpful for you try {

    $facebook->api('/'.$groups[$id].'/feed', 'POST',
               array( 
                 'access_token' => $access_token,
                 'message' => stripslashes(stripslashes($mapp_message)),
                 'name' => stripslashes($name),
                 'link' => $link,
                 'description' => stripslashes(stripslashes($description)),
                 'picture' => "images/send_imges/".$image
                    )
            );
    } catch(FacebookApiException $e) {
        echo $e;
    }
0

The Graph API documentation for Groups mentions a way to retrieve the documents from a group. If you click the docs connection in the document, it'll take you to the Graph API Explorer, where you can test your sample queries. So, basically, all you need to do to obtain the document uploaded to a group is perform a request to the following url with a valid Access Token (with no special permission):

https://graph.facebook.com/groupId/docs

Or, if you want to access a specific doc, you need the document_id for that particular doc. So you can simply request the following URL with a valid Access Token:

https://graph.facebook.com/docsId

The instructions on posting a doc and its related permissions have been discussed in this answer. I'm not very sure whether it works or not as I have not tested the method. But I'm pretty sure that you can read the details by making an API call to the urls mentioned above.

Community
  • 1
  • 1
Rahil Arora
  • 3,644
  • 3
  • 26
  • 43
  • I have tried to post a doc into a group but this fails, see: http://stackoverflow.com/questions/22185817/post-or-update-a-document-to-a-facebook-group-via-graph-api – homer_simpson Mar 11 '14 at 22:53
  • According to http://stackoverflow.com/a/22768509/253608 and https://developers.facebook.com/docs/graph-api/reference/v2.0/groupdoc you cannot Publish, Delete, or Update docs via Graph API. – electblake Jun 06 '14 at 14:26