forked from Thuzi/facebook-node-sdk
-
Notifications
You must be signed in to change notification settings - Fork 115
Open
Description
I was trying to post a post to Facebook with multiple images, but facebook was giving me error when I was adding attached_media parameter to the ${pageId}/feed, This is how I ended up doing it:
const postData = {
message: post.text,
};
images.forEach((imageId, index) => {
postData[`attached_media[${index}]`] = `{"media_fbid": "${imageId}"}`
});
Looping over all the images, and manually adding attached_media[index] parameter.
It would be nice if we could just add it as an array, like this:
const postData = {
message: post.text,
attached_media: [{"media_fbid": "${imageId1}"}, {"media_fbid": "${imageId2}"}]
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels