The error is a 400 error a bad request. This means there is something wrong with you're request. Also the error that Facebook returns suggest that you have an invalid parameter. So I suggest to double check you're parameters that you are sending and make sure you sending the correct amount of parameters in the right order and the right values.
creating event using facebook sdk 3.1
-
02-04-2022 - |
Pregunta
i am trying to create an event but getting error . i am writing following code to create event using facebook sdk 3.1
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
@"My Test Event",@"name",
@"Bangalore",@"location",
@"1297641600",@"start_time",
@"1297468800",@"end_time", nil];
NSString * pRequest = [NSString stringWithFormat:@"me/events"];
[FBRequestConnection startWithGraphPath:pRequest parameters:params HTTPMethod:@"POST" completionHandler:^(FBRequestConnection *connection, id result, NSError *error) {
if (!error)
{
NSLog(@"Facebook Post Success..");
} else
{
NSLog(@"Facebook Post Failed..");
NSLog(@"ERROR : %@", error.localizedDescription);
}
}];
error :
Error Domain=com.facebook.sdk Code=5 "The operation couldn’t be completed. (com.facebook.sdk error 5.)" UserInfo=0xa180200 {com.facebook.sdk:ParsedJSONResponseKey={
body = {
error = {
code = 100;
message = "(#100) Invalid parameter";
type = OAuthException;
};
};
code = 400;
}, com.facebook.sdk:HTTPStatusCode=400}
can anybody help .....
thanks in advance
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow