Is it possible that i can post and retrieve a group\'s documents with the facebook group api? i have went through the documentation and couldn\'t find anything that explain
The only page in the Facebook API docs I found that mentions group documents is this: https://developers.facebook.com/docs/reference/api/group/
You can retrieve the documents of a group with the docs connection of the group.
Use a URL of this form:
https://graph.facebook.com/group_id/docs?access_token=...
With the ID of a doc, you can request it directly:
https://graph.facebook.com/doc_id?access_token=...
Using the JavaScript SDK:
FB.api('/doc_id', function(doc) {
alert(document.body.innerHTML = doc.message);
});
(requires permissions publish_stream and manage_groups)
var doc = {
subject: 'Test',
message: 'This is a test doc.'
};
FB.api(group_id + '/docs', 'post', doc, function(response) {
if (!response || response.error) {
alert('Error occured');
} else {
alert('Doc ID: ' + response.id);
}
});