I'm struggling with the graph api for a few days now and I can't seem to get any further.
In my appdelegate i've placed the following code within the didFinishLaunching
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 the users feed out. I use the following code to place the data into a proper 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 couldn’t be completed. (facebookErrDomain error 10000.)
I've place the FBRequestDelegate in my interface file as following:
@interface TabbedCalculationAppDelegate : NSObject
<FBRequestDelegate>{
Is there something what i'm missing?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…