0

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.

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
Vishal Kukreja
  • 117
  • 1
  • 7

1 Answers1

0

If you look around in the API page for KaiOS you can see that they are not offering the MozActivity API and it's not even referenced in the Other Web API they reference so definitely it's not available in the current version of KaiOS.

It makes sense as this is an API that was offered by FirefoxOS and KaiOS offers part of the experience from FirefoxOS.

edoput
  • 1,212
  • 9
  • 17
  • thanks for the reply. Yes, we refer FirefoxOS code snippets for the same. And we have been using this for various activities like pick, view. However, was stuck with share. Any specific reason for getting DOMError in this scenario? – Vishal Kukreja Apr 03 '20 at 07:31