【发布时间】:2015-09-09 12:38:46
【问题描述】:
我正在开发一个 WP 插件来将 WP 帖子发布到 FB。我正在尝试使用 javascript SDK 将从我的网站生成的 SWF 视频发布到 FB。缩略图、说明链接和所有其他内容都已发布。但是当我单击缩略图时,它没有播放视频,而是重定向到链接。播放按钮也没有显示。我正在附上屏幕截图。
我正在附上我的部分代码...
var picture = data.preview_img;
var source = swf_path+'fbap.swf?wpContent='+content+'&bg_clr='+bg_color+'&bg_image='+bg_image+'&font_color='+font_color+'&repeat='+fill_mode+'&video_url='+uid;
var all_item = {
method: 'feed',
type: 'video',
picture: picture,
source: source,
name:'Facebook Dialogs',
description: 'Using Dialogs to interact with users.'
}
.................................................................
FB.api('/me/feed', 'post', all_item , function(response) {
if (!response || response.error) {
alert('Error occured: ' + response.error.message);
} else {
//Code
}
}
我也用元标记做到了。
<meta property="og:title" content="Fly, you fools!" />
<meta property="og:type" content="website"/>
<meta property="og:description" content="Content for Description" />
<meta property="og:image" content="http://i2.ytimg.com/vi/meOCdyS7ORE/mqdefault.jpg" />
<meta property="og:site_name" content="Content for caption"/>
<meta property="og:video" content="http://www.youtube.com/v/meOCdyS7ORE?version=3&autohide=1">
<meta property="og:video:type" content="application/x-shockwave-flash">
<meta property="og:video:width" content="640">
<meta property="og:video:height" content="360">
作为测试的 Youtube 视频可以正确发布。但它有缓存问题。而且我无法通过大源网址。 有什么解决办法吗?提前感谢您的帮助。
【问题讨论】:
标签: wordpress actionscript-3 facebook-graph-api apache-flex facebook-javascript-sdk