我曾经通过对话来发布 friend 墙。 这里 self.fbFriendsInvitedid 是我 friend id 的数组。我想要延迟打开 dilog。因为如果数组元素更大,那么应用程序就会崩溃。我该怎么办?
Facebook *fb = [((AppDelegate*)[[UIApplication sharedApplication] delegate]) fbInstance];
NSLog(@"%@",self.fbFriendsInvited);
NSLog(@"%@",self.fbFriendsInvitedid);
for (int i=0; i<self.fbFriendsInvitedid.count; i++) {
NSObject *obj=[self.fbFriendsInvitedid objectAtIndex:i];
NSLog(@"%@",obj);
NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys:
obj,@"to",@"Invite Me", @"name", @"available for iOS apps in Facebook Platform.", @"caption", @"Check out 'Invite Me' for iOS & be my friend here",@"description",@"http://www.inviteme.com",@"link",@"http://www.facebookmobileweb.com/inviteme/img/facebook_icon_large.png", @"picture",nil];
[fb dialog:@"feed" andParams:params andDelegate:self];
请帮忙!!
最佳答案
您可以将代码放入某个方法中,并在延迟后调用它,如下所示:
[self performSelector:@selector(onClickPost) withObject:nil afterDelay:0.5];
关于iphone - 我们如何在通过对话框发布 Facebook 好友状态的循环之间添加延迟?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18629003/