Ich hatte folgenden Code mit Bezug auf folgende link getan, um Batch-Anfrage zum Hochladen mehrerer Fotos in Facebook zu erstellen.Laden Sie mehrere Fotos auf Facebook mit Batch-Anfrage
Ich hatte eine Lösung für das Hochladen mehrerer Fotos auf Facebook durch diesen Facebook graph API.
CODE bekommt:
NSString *jsonRequest1 = @"{ \"method\": \"POST\", \"relative_url\": \"me/photos\" , \"body\": \"Hello 1\", \"attached_files\": \"file1\" }";
NSString *jsonRequest2 = @"{ \"method\": \"POST\", \"relative_url\": \"me/photos\" , \"body\": \"Hello 2\", \"attached_files\": \"file2\" }";
NSString *jsonRequestsArray = [NSString stringWithFormat:@"[ %@, %@ ]", jsonRequest1, jsonRequest2];
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:jsonRequestsArray,@"batch",nil];
[params setObject:UIImagePNGRepresentation(self.image1) forKey:@"file1"];
[params setObject:UIImagePNGRepresentation(self.image2) forKey:@"file2"];
[objFacebook requestWithGraphPath:@"me" andParams:params andHttpMethod:@"POST" andDelegate:self];
Nun, wenn ich diesen Code leite ich die folgende Ausgabe bekam.
Ergebnis Wörterbuch in- (void)request:(FBRequest *)request didLoad:(id)result
(
{
body = "{\"error\":0,\"error_description\":\"File file1 has not been attached\"}";
code = 400;
headers = (
{
name = "HTTP/1.1";
value = "400 Bad Request";
},
{
name = "Content-Type";
value = "text/javascript; charset=UTF-8";
}
);
},
{
body = "{\"error\":0,\"error_description\":\"File file2 has not been attached\"}";
code = 400;
headers = (
{
name = "HTTP/1.1";
value = "400 Bad Request";
},
{
name = "Content-Type";
value = "text/javascript; charset=UTF-8";
}
);
}
)
Ich weiß nicht, wie diese angehängten Dateien .. Kann mir jemand helfen, dieses Problem herauszufinden.
Gibt es Änderungen in meinem Code, dann lass es mich wissen.
Vielen Dank im Voraus ...
Dies ist UIImage, die ich auf Facebook hochladen möchte. –
Haben Sie versucht, auf diese Website zu gehen: http://developers.facebook.com/docs/reference/api/batch/ sieht sehr hilfreich aus Hoffe, das hilft – user1429586
Ich hatte diesen Link vor der Frage hier zu sehen, liebe .. –