问题描述
我正在尝试从自己的应用程序共享指向Facebook的链接.以下是使用的步骤/代码段:
I am trying to share a link to Facebook from own application.Below are the steps/code snippet used:
在单击某些媒体项目时,在单击选项"菜单时,用户可以选择Facebook.
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);
};
在这里,它进入onerror()
,甚至没有在移动菜单中显示Facebook,而仅在控制台中显示DOMError.请协助.
Here, it's going in onerror()
, it's not even showing Facebook in mobile menu, only getting DOMError in console. Please assist.
推荐答案
如果您在 API页面查看KaiOS 您会看到他们没有提供MozActivity API,甚至没有提供在它们引用的其他Web API 中引用,因此绝对不能在当前版本的KaiOS.
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 evenreferenced in the Other Web API they reference so definitely it's not available in the current version of KaiOS.
这是有道理的,因为这是FirefoxOS提供的API,而KaiOS提供了FirefoxOS的部分体验.
It makes sense as this is an API that was offered by FirefoxOS and KaiOS offers part of the experience from FirefoxOS.
这篇关于如何通过自己的应用程序(KaiOS功能手机)在Facebook上共享链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!