开发者

Facebook Connect iPhone StreamDialog delegate dialogDidSucceed

开发者 https://www.devze.com 2022-12-21 07:03 出处:网络
I use FBStreamDialog to let users publish on their news fee开发者_Python百科d. [fbStreamDialog show];

I use FBStreamDialog to let users publish on their news fee开发者_Python百科d.

[fbStreamDialog show];

makes the dialog view popup, the user can press cancel or submit that message.

Now...my problem is that both buttons close the dialog view and call the delegate method dialogDidSucceed.

How do I find out which button was pressed? Its very important for me to know, any useful advice would be reaally really nice!

Thanks, John


ok... didnt want to give up. just in case somebody else gets the same problem..

if you do not mind making a slight modification to the fbconnect original code - open FBDialog.m and add the following line to -(void)webViewDidFinishLoad...

[_webView stringByEvaluatingJavaScriptFromString:@"document.getElementById('cancel').onclick = function onclick(event) { window.location.href = 'fbconnect:cancel'; }"];

this will call the dialogDidCancel delegate method instead the dialogDidSucceed.

cheers.


there should be button index so that you can recognize which button was pressed.


I asked the facebook connect developer team and got the following answer:

We don't currently reveal what button the user clicked in order to avoid incentivization of publishing actions. The DidSucceed just lets you know the dialog was run properly, and FB will publish or not publish the story appropriately.


Same problem, this worked for me.

  • (void)dialogCompleteWithUrl:(NSURL *)url { if (![[url absoluteString] isEqualToString:@"fbconnect://success#="]) { // your msg } }
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号