I am trying to publish a message on my facebook wall from my application. First time the publish is successful. However during the second and successive times I am getting “The operation couldn’t be completed. (FacebookErrDomain:10000)”. please help me on this.
P.S: I am not using ARC, eventually no static variables.
Trying to implement the SSO feature of facebook.
I am calling three methods in the app,
-(void)signintoFacebook{
if (![self.facebook isSessionValid]) {
NSArray *permissions=[NSArray arrayWithObjects:@"read_stream",@"publish_stream", nil];
[self.facebook authorize:permissions];
NSLog(@"first permission");
}else{
NSLog(@"second");
if ([self.delegate respondsToSelector:@selector(signedIntoFacebook)]) {
[self.delegate signedIntoFacebook];
}
}
}
-(void)postToFacebook{
NSMutableDictionary *params = [NSMutableDictionary dictionary];
[params setObject:@"Good Morning..!!" forKey:@"message"];
[self.facebook requestWithGraphPath:@"me/feed" andParams:params andHttpMethod:@"POST" andDelegate:self];
}
works fine for the first post. During the second try my error message is caught in this method
-(void)request:(FBRequest *)request didFailWithError:(NSError *)error{
NSLog(@"The request failed to load %@",[error localizedDescription]);
}
try this method you get more inforamtion
please check
Err details:I think you have error code 506 , this error is duplicate status message
if you send same message again to again then error is generate, if you want to send same message then you use one trik
you logout facebook and again login , send message then error not generate.