我想通过我的 android phonegap applicatoion 在 facebook 上分享视频。它可以在 facebook 上分享带有图片的视频。但无法播放视频。我集成了flowplayer。我在我的服务器上传flowplayer.commercial-3.2.15.swf、flowplayer.controls-3.2.14.swf、flowplayer.pseudostreaming-3.2.11.swf和fp.js,代码如下:
function facebookWallPost(e) {
var id = e;
$.post('http://influxhostserver.com/phonegap/previewvideo.php',
{'id':id},
function(result)
{
//alert(result);
var res = eval('('+result+')');
var id = res['id'];
var video_no = res['video_no'];
var username = res['full_name'];
var video_title = res['video_title'];
var video_desc = res['video_desc'];
var pic = 'http://influxhostserver.com/phonegap/thumbnail/320*214/'+video_no+'.jpg';
var vid = 'http://influxhostserver.com/phonegap/video/'+video_no+'.mp4';
var swfURL ='http://influxhostserver.com/phonegap/video/flowplayer.commercial-3.2.15.swf?file='+vid;
FB.init({
//appId : "168284719986345",
appId : "318021858301087",
nativeInterface : CDV.FB,
useCachedDialogs : false
});
console.log('Debug 1');
var params = {
method: 'feed',
name: video_title,
picture: pic,
link:'gratitube.com',
caption: 'Reference Documentation',
description: video_desc,
width: 400,
height: 300,
source:swfURL,
type: 'video/mp4',
};
console.log(params);
FB.ui(params, function(obj) { console.log(obj);});
}
);
}