Skip to content
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

How to attach a file to Fb.api? #102

Open
dfb243fda opened this issue Jun 2, 2015 · 1 comment
Open

How to attach a file to Fb.api? #102

dfb243fda opened this issue Jun 2, 2015 · 1 comment

Comments

@dfb243fda
Copy link

Hello, I want to upload a picture to an album. Here is my code:
FB.api(folderId + '/photos', 'post', {"source": fs.createReadStream(filePath)}, function (res) {
if(!res || res.error) {
console.log(!res ? 'error occurred' : res.error);
return;
}
console.log('Post Id: ' + res.id);
});
In this case I get the error from facebook: (#324) Requires upload file.

@dantman
Copy link

dantman commented Jan 25, 2016

This should work now in 1.1.0-alpha1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants