javascript - How to share video / audio file on facebook from iPhone app created using titanium appcelrator -
i want share video / audio kind of file on facebook .
i able share status or other stuffs except audio / video.i working in titanium . here code
login.addeventlistener('click', function(e){ titanium.facebook.authorize(); var f=titanium.filesystem.getfile(ti.filesystem.applicationdatadirectory+"/"+"audio"+"/"+"abc.mp4"); var blob=f.nativepath; alert(blob); var data={ message: 'check video!', video: blob } titanium.facebook.requestwithgraphpath('me/videos', data, 'post', function(e) { if (e.success) { alert("success! fb: " + e.result); } else if (e.error) { alert(e.error); } else { alert('unknown response.'); } }); });
you passing file path (nativepath
) facebook, instead try passing actual image blob this:
var blob=f.read(); var data={ message: 'check video!', video: blob } // rest....
Comments
Post a Comment