0

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.

1 Answer 1

1

The reason was because my app was in develop mode, I should set that in Facebook develop profile to live mode. enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.