I am trying to share a link to Facebook from own application. Below are the steps/code snippet used:
On click of some media item, on click of Options menu user can select Facebook.
var activity = new MozActivity({
name: "share",
data: {
type: "url",
url: "http://google.com/"
}
});
activity.onsuccess = function() {
setTimeout(function() {
window.focus();
}, 500);
};
activity.onerror = function() {
console.log("The activity encounter en error: " + this.error);
};
Here, it's going in onerror()
, it's not even showing Facebook in mobile menu, only getting DOMError in console. Please assist.