I've followed the instruction of sharing android app on Facebook that would be: 1. Link the SDK with Maven 2. set android app id on manifast file and provider and adding Android Key Hash to developer profile. but didn't add Facebook Activity as I found it is optional. codes for sharing video is:
File file = new File(getActivity().getFilesDir() + "/" + videoPath);
Uri videoFileUri = Uri.fromFile(file);
ShareVideo ShareVideo = new ShareVideo.Builder()
.setLocalUrl(videoFileUri)
.build();
ShareVideoContent content = new ShareVideoContent.Builder()
.setVideo(ShareVideo)
.build();
ShareDialog.show(ShareVideoFragment.this, content);
and codes for sharing link is:
ShareLinkContent content = new ShareLinkContent.Builder()
.setContentUrl(Uri.parse(videoPath))
.build();
ShareDialog.show(ShareVideoFragment.this, content);
the problem is that other users(except sender) can't see the link and video that were posted.