我QuickBlox
在我的iOS
应用程序中使用并尝试在Places
表中添加数据
QBLPlace *place = [QBLPlace place];
place.geoDataID = 34691;
place.photoID = 447;
place.title = [NSString stringWithFormat:@"%@",[aView.annotation title]];
place.address = @"London, Gadge st, 34";
place.placeDescription = @"My place description";
place.latitude = pinLocation.coordinate.latitude;
place.longitude = pinLocation.coordinate.longitude;
[QBLocation createPlace:place delegate:self];
但我无法添加地点。下面是控制台日志
休息请求:
POST http://api.quickblox.com/places.xml
headers:{
"QB-SDK" = "iOS 1.3.1";
"Qb-Token" = c1191ff8ffbfdb79b11fba6bf2a4c054d2644de8;
"QuickBlox-REST-API-Version" = "0.1.1";
}
parameters:{
"place[address]" = "London, Gadge st, 34";
"place[description]" = "My place description";
"place[geo_data_id]" = 34691;
"place[photo_id]" = 447;
"place[title]" = "The Bridge Room";
}
raw body:place[address]=London%2C%20Gadge%20st%2C%2034&place[description]=My%20place%20description&place[geo_data_id]=34691&place[photo_id]=447&place[title]=The%20Bridge%20Room
2013-01-02 10:21:14.543 Chat.Points[10229:1d903] Query QBLPlaceCreateQuery DEALLOC
2013-01-02 10:21:14.551 Chat.Points[10229:1d903] Request finished, response:
休息响应:
<QBASIHTTPRequest: 0xb40fc00>
headers:{
"Access-Control-Allow-Origin" = "*";
"Access-Control-Request-Method" = "*";
"Cache-Control" = "no-cache";
Connection = Close;
"Content-Length" = 116;
"Content-Type" = "application/xml; charset=utf-8";
Date = "Wed, 02 Jan 2013 04:51:14 GMT";
"QuickBlox-REST-API-Version" = "0.1.1";
Server = "nginx/1.0.15";
Status = "422 Unprocessable Entity";
"X-Rack-Cache" = "invalidate, pass";
"X-Request-Id" = 5ad6e7d628b4fbd931b7896058f012cd;
"X-Runtime" = "0.052140";
"X-UA-Compatible" = "IE=Edge,chrome=1";
}
body:<?xml version="1.0" encoding="UTF-8"?>
<errors type="array">
<error>No photo with such id found</error>
</errors>