Created
August 19, 2013 08:59
-
-
Save apla/6267061 to your computer and use it in GitHub Desktop.
blackberry.invoke.card
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins.shareSocial.share = function (message, image, url, title, successCallback, failCallback) { | |
function success(args) { | |
successCallback && successCallback(args); | |
} | |
function fail(args) { console.log (args); | |
failCallback && failCallback(args); | |
} | |
return cordova.exec(function(args) { | |
success(args); | |
}, function(args) { | |
fail(args); | |
}, 'com.blackberry.invoke.card', 'invokeTargetPicker', { | |
request: { | |
action: "bb.action.SHARE", | |
type: "text/plain", | |
data: message, | |
// uri: url, | |
target_type: ["APPLICATION", "VIEWER", "CARD"] | |
}, | |
title: title | |
}); | |
} | |
plugins.shareSocial.share ('123', null, 'http://blackberry.com', 'share'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugins.shareSocial.share = function (message, image, url, title, successCallback, failCallback) { | |
function success(args) { | |
successCallback && successCallback(args); | |
} | |
function fail(args) { console.log (args); | |
failCallback && failCallback(args); | |
} | |
return cordova.exec(function(args) { | |
success(args); | |
}, function(args) { | |
fail(args); | |
}, 'com.blackberry.invoke.card', 'invokeTargetPicker', { | |
request: { | |
action: "bb.action.SHARE", | |
uri: url, | |
target_type: ["APPLICATION", "VIEWER", "CARD"] | |
}, | |
title: title | |
}); | |
} | |
plugins.shareSocial.share ('123', null, 'http://blackberry.com', 'share'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment