iphone - FBDialog cancel button callback -
When a user hits the cancel button in FBStreamDialog, which comes out of FBDialog, then I have trouble paying attention to that When the user clicks the Publish button, it seems that the callback FBDialog is dismissed; the little thing is always passed with the situation: whatever the button is clicked, what am I doing wrong? Thanks!
Here is a class that handles all the FBCNact in my app:
@interface socialmediaviewcanner: UIViewController & lt; FBSessionDelegate, FBRexestDelegate, FBDialogDelegate & gt; {...
In this way I am logging in.
FBLoginDialog * dialog = [[[FBLoginDialog alloc] initWithSession: self.fbSession] autorelease]; Dialog.delegate = self; [Dialog show];
Here I have instituted the FBstream Dialogue.
FBStreamDialog * dialog = [[[FBstream dialog] alloc] init]; Dialog.delegate = self; Dialog.userMessagePrompt = @ "Enter additional comment:"; Dialog.attachment = [NSString stringWithFormat: @ "{\" name \ ": \" My name is string% @ \ "," "\" href \ ": \" http: //xyz.com/ \ "," " \ "Caption \": \ "placeholder -% @ \", \ "description \": \ "% @ \", \ "attribute \": {\ "more like this \": {\ "text \" : \ "XYZ website \", \ "href \": \ "http: //XYZ.com/ \"}}} ", self.curReview.businessName, self.curReview.reviewType, self.curReview.reviewDetail]; [Dialog show];
Add the following to FBDialog.m / webViewDidFinishLoad as the first line:
[_ webView stringByEvaluatingJavaScriptFromString: @ "document.getElementById ('Cancel'). Onclick = function onclick (event) {window.location.href = 'fbconnect: cancel';}"];
Keep in mind that Facebook does not let users "penalize" you to cancel :-)
Comments
Post a Comment