-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem in posting photos in a Batch process. #113
Comments
|
Hi @dantman , thanks for your quick reply...
Glad that you are thinking about this. Thanks again for your very detailed info. |
Would you care to test out I've added upload support. You can pass a Buffer or a ReadableStream as value or an object containing FB.api('', 'post', {
batch: [{
method: "POST",
relative_url: "{Object-id}/feed",
body: "message=post one",
attached_files: 'file1'
}, {
method: "POST",
relative_url: "{Object-id}/feed",
body: "message=post two",
attached_files: 'file2'
}],
file1: fs.createReadStream('post1.jpg'),
file2: fs.createReadStream('post2.jpg')
}, function(res) {
if (!res || res.error) {
console.log(!res ? 'error occurred' : res.error);
return;
}
console.log(res[0]);
console.log(res[1]);
}); |
Hi @dantman , sry for late reply, i tried to follow steps that you suggested. I am able to post two (or more) posts, but pic is not getting attached to the post. Please suggest if i am missing something obvious. |
Hi @dantman , it works only if i change |
You should ask on SO what the proper graph API call is to publish a post with a photo attachment. I don't see any documentation saying posting to */feed with an upload is the way to do that. |
Hey Guys,
i have been trying to post local photo(s) on fb with node terminal app in batch process with the following,
The error i am getting is following,
This is similar to the example given in fb docs titled under
Uploading binary data
.I think the title says that you need to upload binary files, which i don't know how to that, Any help?
If i remove the
attached_files
from the code above it is able to create two post on fb on thatnode
If some has done this before can you please post the snapshot of your code. (Thanks)
Please help me with this. Any help will really appreciated.
Similar Post
The text was updated successfully, but these errors were encountered: