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

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -