How to share link on Facebook from own application (KaiOS feature phone)

305 views Asked by At

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.

1

There are 1 answers

1
edoput On

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.