我正在使用 codova 2.9.0。我提供了通过 cordova facebook connect 插件在 facebook 中共享视频和图像的选项。分享成功。但是当我点击 facebook 页面中的视频时,出现了这个错误
抱歉,您使用的应用程序配置错误。请稍后重试。
它有两个按钮 Go Home 和 Find Another App
这是我的代码:
FB.ui({
method: 'feed',
name: '',
caption: '',
description: des,
link: 'http://apps.facebook.com/mobile-start/',
source: postimage,
picture: url,
actions: [{ name: 'Get Started', link: 'http://apps.facebook.com/mobile-start/' }],
},
function(response) {
console.log('publishStory UI response: ', response);
});
我错过了什么?
最佳答案
我找到了解决方案 Here 你需要做的是
- 第一行是对 HTML head 标签的修改。这在您的页面中是主动或被动共享所必需的。
- 以粗体显示的第一个元标记是被动共享所必需的,因为您必须拥有用于被动共享的 Facebook 应用程序,详见 Passive App Setup.。
- 以斜体突出显示的是您必须提供给此模板的值。
所以元标记代码会像
<head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# video: http://ogp.me/ns/video#">
<!-- The following tag is required for passive sharing -->
<meta property="fb:app_id" content="yourFacebookAppIdHere" />
<meta property="og:type" content="video.other" />
<meta property="og:title" content="yourTitleHere" />
<meta property="og:description" content="yourDescriptionHere" />
<meta property="og:url" content="yourURLwithTheEmbeddedVideo">
<meta property="og:image" content="yourImageUrlHere"/>
<meta property="og:video" content="yourUrlHere" />
<meta property="og:video:secure_url" content="yourSecureUrlHere" />
<meta property="og:video" content="http://player.ooyala.com/player.swf?embedCode=YourOoyalaEmbedCodeHere&keepEmbedCode=true" />
<meta property="og:video:secure_url” content="https://player.ooyala.com/player.swf?embedCode=YourOoyalaEmbedCodeHere&keepEmbedCode=true" />
<meta property="og:video:type" content="application/x-shockwave-flash" />
关于android - facebook分享视频不播放,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23077394/