FacebookErrDomain error 10000 when calling the schedule api Facebook ios

I have been struggling with the api schedule for several days and I can’t watch anymore.

In my appdelegate, I placed the following code in the didFinishLaunching file

facebook = [[Facebook alloc] initWithAppId:@"cut-app-id-out"]; NSArray* permissions = [[NSArray arrayWithObjects: @"email", @"user_location", @"user_events", @"user_checkins", @"read_stream", nil] retain]; [facebook authorize:permissions delegate:self]; NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"test message from stackoverflow", @"message", nil]; [facebook requestWithGraphPath:@"/me/feed" andParams:params andDelegate:self]; 

as you can see I'm trying to get users to log in. I use the following code to put data into the correct dictionary.

 - (void)request:(FBRequest*)request didLoad:(id)result { if ([result isKindOfClass:[NSDictionary class]]) { NSLog(@"count : %d ", [result count]); NSArray* resultArray = [result allObjects]; NSLog(@"count : %d ", [result count]); result = [resultArray objectAtIndex:0]; NSLog(@"count : %d ", [result count]); result = [result objectAtIndex:0]; } } 

But the didFailWithError: function gives me the following error: The operation cannot be completed. (facebookErrDomain 10000 error.)

I put FBRequestDelegate in my interface file as follows:

 @interface TabbedCalculationAppDelegate : NSObject <FBRequestDelegate>{ 

Is there something I am missing?

+3
source share
1 answer

Much more need to process Facebook responses, especially after authorization. You will not be able to make Facebook API calls immediately after the authorize method. See your sample code that shows how to respond to the various events that you will need, and most importantly, fbDidLogin and fbDidNotLogin from them. Only after a successful login should you access the graphical API.

Also, it looks like you're trying to post using the Graph API. Unfortunately, this is not a way to do this, but a call like [facebook requestWithGraphPath:@"me/feed" andDelegate:self]; Designed for read-only use. Again, consider the link above for an example of using publish_stream permission (their code has an example publishStream method).

+1
source

All Articles