我正在尝试实现一个简单的表单,允许我将照片添加到场地(有30多个)。我按照指南here更改了一些内容以匹配当前的api。当我使用上传器时,我得到下面的JSON响应。一切都井井有条吗?我得到了200回复,但我没有看到这些照片被添加到他们各自的场地。我还包含了我用于上传的表单的html,如果出现任何问题,请查看我们。谢谢!
JSON响应:
{"meta":{"code":200},"notifications":[{"type":"notificationTray","item":{"unreadCount":0}}],"response":{"photo":{"id":"502ab14fe4b0ed9600d7722d","createdAt":1344975183,"prefix":"https:\/\/irs3.4sqi.net\/img\/general\/","suffix":"\/atVMrQ02CcgHIamCVmTugx4MCX4hIEVv1lLqbo24cnA.jpg","width":700,"height":525}}}
表格HTMl:
<form action="https://api.foursquare.com/v2/photos/add" method="post" enctype="multipart/form-data" v="20120809" >
<p>Venue ID: <input type="text" name="venueId"></p>
<p><input type="file" name="photo"></p>
<input type="hidden" name="oauth_token" value="MY OAUTH TOKEN">
<input type="submit">
</form>