我将此link称为在Facebook页面上发布照片,但每次出现以下错误。
{Response: responseCode: 400, graphObject: null, error: {HttpStatus: 400, errorCode: 324, errorType: OAuthException, errorMessage: (#324) Requires upload file}, isFromCache:false}
代码:
Session session = Session.getActiveSession();
if (session != null) {
// Check for publish permissions
List<String> permissions = session.getPermissions();
if (!isSubsetOf(PERMISSIONS, permissions)) {
pendingPublishReauthorization = true;
Session.NewPermissionsRequest newPermissionsRequest = new Session.NewPermissionsRequest(
buzzreview.this, PERMISSIONS);
session.requestNewPublishPermissions(newPermissionsRequest);
return;
}
Bundle postParams = new Bundle();
postParams.putString("message", "message");
postParams.putString("url", PhotoUrl);
Bundle postParams = new Bundle();
postParams.putString("message", message);
postParams.putString("url", PhotoUrl);
// postParams.putByteArray("url", PhotoUrl);
new Request(session, "/page-id/photos", params,
HttpMethod.POST, new Request.Callback() {
public void onCompleted(Response response) {
}).executeAsync();
我不知道我在哪里滞后。
请给我指导。