2014-03-18 47 views
1

繼Instagram的API文檔,以創建Instagram的API訂閱,我跑在命令行中執行以下操作:如何使用cURL

$ curl -F 'client_id=my_client_id' \ 
> -F 'client_secret=my_client_secret' \ 
> -F 'object-geography' \ 
> -F 'aspect=media' \ 
> -F 'lat=35.657872' \ 
> -F 'lng=139.70232' \ 
> -F 'radius=1000' \ 
> -F 'callback_url=http://http://requestb.in/my_string' \ 
> https://api.instagram.com/v1/subscriptions/ 

,並得到了以下錯誤:

Warning: Illegally formatted input field! 
curl: option -F: is badly used here 
curl: try 'curl --help' or 'curl --manual' for more information 

我也嘗試捲曲 - 幫助和捲曲 - 手動,但無法根據他們的內容計算出來。我如何成功創建訂閱?

回答

1

您所面臨的問題與這一個:

> -F 'object-geography' \ 

這應該是Key=Value配對參數。但是你只使用一個。所以檢查一下。可能它會是

> -F 'object=geography' \ 
      ^check this