Search code examples
androidfacebookfacebook-android-sdkfbsdk

FB sharing multiple url at single post


I know the way how to post single link to FB

if (ShareDialog.canShow(ShareLinkContent.class)) {
        ShareLinkContent linkContent = new ShareLinkContent.Builder()
                .setContentUrl(Uri.parse(url))
                .setQuote(text)
                .build();
        shareDialog.show(linkContent);
    }

and it works fine, but I need to share multiple links + link name. Is it possible?

what I've tried:

1) pass data via share intent - text not supported, only url

2) ShareOpenGraphObject + ShareOpenGraphAction + ShareOpenGraphContent - looks costume object not supported from 2017? tried several samples - seems not working

3) creates dialog with generated message (links and text) then GraphRequest -> "/me/feed" -> HttpMethod.POST works for test user. but FB denied publis_actions request because of "app shouldn't generate message, user should add text by himself"...

some more ideas?


Solution

  • Facebook is very strict when it comes to posting. Using their SDK you can share 1 link per post, if you want multiple links - you'll need to make multiple posts.

    It is possible to post multiple links with the Graph API, but you'll need permission from FB, and since you don't have it I guess you are out of luck.