diff --git a/src/device/cocoon_dialog.js b/src/device/cocoon_dialog.js index 487d624..3cf01fa 100644 --- a/src/device/cocoon_dialog.js +++ b/src/device/cocoon_dialog.js @@ -110,7 +110,7 @@ Cocoon.define("Cocoon.Dialog" , function(extension){ return Cocoon.callNative("IDTK_APP", "showTextDialog", args, true); }else{ setTimeout(function() { - var result = prompt(properties.message, properties.text); + var result = prompt(params.message, params.text); var eventObject = result ? Cocoon.Dialog.onTextDialogFinished : Cocoon.Dialog.onTextDialogCancelled; eventObject.notifyEventListeners(result); }, 0); @@ -170,7 +170,7 @@ Cocoon.define("Cocoon.Dialog" , function(extension){ return Cocoon.callNative("IDTK_APP", "showMessageBox", args, true); }else{ setTimeout(function() { - var result = confirm(properties.message); + var result = confirm(params.message); var eventObject = result ? Cocoon.Dialog.onMessageBoxConfirmed : Cocoon.Dialog.onMessageBoxDenied; eventObject.notifyEventListeners(); }, 0); diff --git a/src/social/cocoon_facebook.js b/src/social/cocoon_facebook.js index 7688594..c294e31 100644 --- a/src/social/cocoon_facebook.js +++ b/src/social/cocoon_facebook.js @@ -582,11 +582,14 @@ Cocoon.define("Cocoon.Social" , function(extension){ }); }, - publishMessageWithDialog: function(message, callback) { - this.fb.showShareDialog(fromCocoonMessageToFBMessage(message), function(response){ - if (callback) { - callback(response.error); - } + publishMessageWithDialog: function (message, callback) { + this.fb.showShareDialog(fromCocoonMessageToFBMessage(message), function (response) { + if (callback) { + if (response.error) + callback(response.error) + else if(!response.post_id) + callback("Not posted"); + } }); }, @@ -880,4 +883,4 @@ Cocoon.define("Cocoon.Social" , function(extension){ } return extension; -}); \ No newline at end of file +});