我每天都在开发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=_"
这对我来说是胡说八道。你能帮助我理解在什么情况下我可以在Facebook上使用它,也许是在一般情况下,并指导我在哪里可以找到更多关于这个主题的正确方向?
发布于 2012-03-17 17:32:12
curl是一个命令行实用程序,它允许您发送HTTP请求。它对于使用web服务API进行开发非常有用。我相信大多数linux发行版都预装了它,但你需要为Windows下载并安装它。(它可能与Cygwin一起提供,但也可以独立安装。)
我建议确保将它的目录添加到PATH环境变量中。同样,在linux中可能不是问题,但在windows中需要手动完成此操作。
发布于 2012-03-17 17:29:50
curl
是一个获取请求的命令。-F
(--form
)参数用于指定表单投递参数。
引用自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.
发布于 2012-03-17 17:32:36
https://stackoverflow.com/questions/9748809
复制相似问题