[英]How handle cancel button of facebook dialog apprequest?
As you know, you can display some facebook views to make some operations, like app requests, post etc. There is a delegate to manage the callbacks like : dialogDidComplete:
, dialogDidNotComplete:
. 如您所知,您可以显示一些Facebook视图以进行某些操作,例如应用程序请求,发布等。有一个委托来管理回调,例如: dialogDidComplete:
, dialogDidNotComplete:
. The view is like that : 视图是这样的:
But there is not differentiation between the cancel and share button. 但取消和分享按钮之间没有区别。 You will have the same callback in dialogDidComplete:
. 您将在dialogDidComplete:
拥有相同的回调dialogDidComplete:
。 The only way to manage a cancelation is the little cross in the corner. 管理取消的唯一方法是角落里的小十字架。 In my case I would like to do some operations if the user pressed share and not when he pressed Cancel. 在我的情况下,如果用户按下共享而不按下取消,我想做一些操作。 The private social network Path manage this case and I'm wondering how ? 私人社交网络路径管理这个案例,我想知道如何?
Do you guys have some ideas ? 你们有什么想法吗?
If I am not wrong: 如果我没错:
if you press Share
you get a requestID
back as part of the returned URL 如果按Share
则会返回一个requestID
作为返回URL的一部分
if you press Cancel
you are returned into dialogDidComplete
but it does not return a requestID
back as part of the returned URL. 如果按“ Cancel
,则返回到dialogDidComplete
但它不会返回requestID
作为返回URL的一部分。
Code: 码:
- (void)dialogCompleteWithUrl:(NSURL *)url {
if (![url query]) {
NSLog(@"User canceled dialog or there was an error");
return;
}
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.