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

和自甴很熟 提交于 2020-05-17 07:28:25

问题


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:


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.



来源:https://stackoverflow.com/questions/60809383/how-to-share-link-on-facebook-from-own-application-kaios-feature-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!