[英]Publishing checkins using facebook graph api
https://graph.facebook.com/profile-id/checkins?access_token=access_token&message= “办公室”
我正在使用上面的图形api,在我的feed上发布签入,我在浏览器上尝试了此操作,我得到了空数组作为响应,我还使用了图形api浏览器允许的access_token(发布签入)。
我收到如下响应
{
"data": [
]
}
final JSONObject jsonobj;
try {
jsonobj = new JSONObject();
jsonobj.put("latitude", fetLatitude);
jsonobj.put("longitude", fetLongitude);
final String message;
final String name = fetPlaceName;
final String placeID = fetPlaceID;
if (edittxtMessageBox != null){
message = edittxtMessageBox.getText().toString();
} else {
message = "I am at: " + fetPlaceName + " using MyAppName";
}
new AlertDialog.Builder(this).setTitle(R.string.check_in_title)
.setMessage(String.format(this.getString(R.string.check_in_at), name))
.setPositiveButton(R.string.checkin, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Bundle params = new Bundle();
params.putString("place", placeID);
params.putString("message", message);
params.putString("coordinates", jsonobj.toString());
Utility.mAsyncRunner.request("me/checkins", params, "POST",
new placesCheckInListener(), null);
}
}).setNegativeButton(R.string.cancel, null).show();
} catch (Exception e) {
e.printStackTrace();
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.