我尝试使用以下代码创建一个通用对象:
Bundle params = new Bundle();
params.putString("type", "fitness.course");
params.putString("url", "http://samples.ogp.me/136756249803614");
param.putString("title", "Sample Course");
params.putString("description", "");
Request request = new Request(
Session.getActiveSession(),
"me/objects/fitness.course",
params,
HttpMethod.POST, new Request.Callback(){
@Override
public void onCompleted(Response response) {
if(response.getError()==null)
System.out.println("Object succesfully created!!");
else
System.out.println("Object NOT Created!!"+response.getError());
}}
);
Response response = request.executeAndWait();
但我在我的 Logcat 中读到了这个:
10-07 15:33:04.009: I/System.out(23284): Object NOT created!! {HttpStatus: 400, errorCode: 2500, errorType: OAuthException, errorMessage: Cannot specify type in both the path and query parameter.}
我不明白错误消息...如何创建课程对象并更新课程的数据(gps 状态)?我需要一个后端服务器来存储我的课程数据?后端服务器只是一种选择?