-1

I'm trying to create a facebook bot but can not connect to facebook because my node.js command prompt is telling me that "curl" is not recognized as an internal or external command. I have tried to download cURL and have followed the steps in this thread (Curl not recognized as an internal or external command, operable program or batch file) but the error still persists.

Here is a screenshot of the terminal: Curl Error

sickguy125
  • 15
  • 3

1 Answers1

0

cURL is a command line tool. The examples in the documentation are meant to give you a simple command line example for making the HTTP request. In node, you would want to use something like the request or restify module.

amuramoto
  • 2,838
  • 1
  • 11
  • 15
  • I got the same error when I used request instead of curl. Do you mind providing the exact wording I should use? – sickguy125 Aug 25 '17 at 17:40
  • Request is a module that sends HTTP requests from node apps. cURL is a command line tool, so you can't just take the example are drop it into request. You need to do `request.post()` and include the url and body of the request, which are a part of the cURL request in the example. https://github.com/request/request – amuramoto Aug 25 '17 at 21:17