视频无法通过流动播放器在Facebook分享中播放

时间:2013-04-18 10:15:33

标签: android facebook cordova phonegap-plugins

我想从我的android phonegap应用程序在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);});

    }
);

}

0 个答案:

没有答案