"卷曲"是什么意思?

cur*_*ets 21 javascript curl facebook

我每天都在开发Facebook JavaScript应用程序,但在Facebook文档和我访问的其他网站上,一直磕磕绊绊地看到一些我不理解的代码片段.

我在谷歌搜索了CURL,并找到了一些关于它的描述.我无法弄清楚Facebook是如何让我使用它的.

curl -F "title=Example Title" -F "description=Description" \
-F "start_time=1329417443" \
"https://graph.facebook.com/PAGE_ID/milestones?access_token=_"
Run Code Online (Sandbox Code Playgroud)

这对我来说是不可能的.你能帮助我理解我可以在Facebook上使用它的背景,也许总的来说,并指导我在哪个方向找到更多关于这个主题的正确方向?

Ili*_*ion 14

curl是一个命令行实用程序,可让您发送HTTP请求.它对于使用Web服务API进行开发非常有用.我相信它预先安装了大多数Linux发行版,但你需要下载并安装它用于Windows.(它可能与Cygwin一起提供,但也可以单独安装.)

我建议确保将其目录添加到PATH环境变量中.同样,在linux中可能不是问题,但你需要在Windows中手动执行此操作.


Rob*_*b W 6

curl是一个获取请求的命令.在-F(--form)的参数用于指定形式POST参数.

引用自man curl:

   -F/--form <name=content>
          (HTTP) This lets curl emulate a filled-in form in which a  user
          has  pressed  the  submit button. This causes curl to POST data
          using the Content-Type  multipart/form-data  according  to  RFC
          2388.  This enables uploading of binary files etc. To force the
          'content' part to be a file, prefix the file  name  with  an  @
          sign. To just get the content part from a file, prefix the file
          name with the symbol <. The difference between @ and < is  then
          that  @ makes a file get attached in the post as a file upload,
          while the < makes a text field and just get  the  contents  for
          that text field from a file.
Run Code Online (Sandbox Code Playgroud)