我是Iphone的新手并且在Facebook应用程序中停留在这里,实际上我在我的TableView中获取了所有我的facebook朋友的列表。当我在桌面视图上选项卡时,我想向我的朋友发送通知,正在显示,当我按下发送按钮时,facebook拨号消失,而我的朋友没有收到通知。你能帮我吗。这是我的代码,
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString* kAppId = @"317060778330475";
Facebook *faceBook = [[Facebook alloc] initWithAppId:kAppId andDelegate:self];
NSDictionary *dic = [facebookInfoArray objectAtIndex:indexPath.row];
NSString *friendId = [dic valueForKey:@"id"];
NSMutableDictionary* params = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"Hi check my application, please!", @"message",
friendId, @"to",
nil];
[faceBook dialog:@"apprequests" andParams:params andDelegate:self];
}
#pragma mark - Facebook Delegates
- (void)dialogDidComplete:(FBDialog *)dialog {
NSLog(@"App Request Sent!");
}
- (void)dialogCompleteWithUrl:(NSURL *)url {
NSLog(@"Urls is :%@",url);
}