简体   繁体   English

android:facebook视频共享错误

[英]android:facebook video sharing error

Below is my code to share video Facebook but not working properly. 以下是我分享视频Facebook但无法正常工作的代码。

Uri videoFileUri = Uri.fromFile(new File(Environment.getExternalStorageDirectory()
                                               , "/video/testing.mp4"));

Log.e("Checking video ","Checking video"+videoFileUri);

ShareVideo video = new ShareVideo.Builder()
        .setLocalUrl(videoFileUri)
        .build();
ShareVideoContent content = new ShareVideoContent.Builder()
        .setVideo(video)
        .build();
ShareApi.share(content,null);

It shows error like this. 它显示了这样的错误。

E/VideoUploader: Error reading video chunk. 
    Expected buffer length - '576'. Actual - '8192'.

实际上,当我们共享大于2MB的视频时,facebook sdk会出现这种错误,请尝试共享小于2MB的视频。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM