我正在使用Excel构建本地应用程序,以使用API将带有图表的消息发布到StockTwits。由于该文件是本地文件,因此API要求使用此语法来上传图表:
curl https://api.stocktwits.com/api/2/messages/create.json -F access_token=<access_token> -F body="Creating a new message with a chart. \$ticker" -F chart=@/path/to/a/local/image/file.jpg
我的JASON正文文本如下:
{"body":"Testing a post for $WDC with a chart testing two again to see if this works","chart":"file://C:/My_Folder/My_File.png"}
但是,当我将其发布到API时,出现以下错误:
{"response":{"status":422},"errors":[{"message":"There was a problem with the URL. Please check to make sure the provided URL is valid"}]}
我的本地文件语法有什么不正确?