android - facebook分享视频不播放

标签 android ios facebook cordova

我正在使用 codova 2.9.0。我提供了通过 cordova facebook connect 插件在 facebook 中共享视频和图像的选项。分享成功。但是当我点击 facebook 页面中的视频时,出现了这个错误

抱歉,您使用的应用程序配置错误。请稍后重试。

它有两个按钮 Go HomeFind 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 你需要做的是

  1. 第一行是对 HTML head 标签的修改。这在您的页面中是主动或被动共享所必需的。
  2. 以粗体显示的第一个元标记是被动共享所必需的,因为您必须拥有用于被动共享的 Facebook 应用程序,详见 Passive App Setup.
  3. 以斜体突出显示的是您必须提供给此模板的值。

所以元标记代码会像

<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/

相关文章:

java - Admob 横幅广告空间不足

ios - objective-c : Autoreleased objects between threads?

android - Xamarin Facebook 登录并使用 Graph api

php - 如何防止 HTML 标签显示在动态元描述中?

android - 如何停止 Firebase 数据库无限循环

java - 为什么我运行它时显示 Hello World?

java - CameraX PreviewView 不显示任何内容

ios - 按月对数据进行排序

ios - 如何使用 MDCAertController Material Design 禁用触摸外屏关闭 View - swift

facebook - 如何获取在 Facebook 中签到某个地方的人员列表