12
votes

I using "ShareDialog" for sharing a link from my app to Facebook wall. When i post a link, it shows the content only in user's timeline and not in home page. What i'm doing wrong?

I'm doing something like that:

// This is how i invokes the shareDialog
FacebookDialog shareDialog = createShareDialogBuilderForLink().build();

private FacebookDialog.ShareDialogBuilder createShareDialogBuilderForLink() {
    return new FacebookDialog.ShareDialogBuilder(this)
    .setPicture("picture url")
    .setName("name")
    .setLink("link url");
}

User's timeline:

enter image description here

Home page:

enter image description here

In home page only shows the name of the app which take it from the link i setted(app in google play) without showing the content of the link(descriptiion, name, Caption...).

2
How can i make the link in Facebook home page to take the content from share Dialog but not from the link.Balflear
did you find any solution to this?Krishnabhadra
I think when you set a link it overrides all of the other properties...StuStirling
Can u find any solution for this? I am in the same issuelacas
Mmm no i leave it that way...Balflear

2 Answers

1
votes

Its because the user chose to not share the link publicly, do you see the little lock icon alongside the time the link was shared? It shows that link is not shared publicly, if its public the icon changes to globe icon.

What to do now?

1) I don't know whether Facebook API allows to set permissions on the post but you can try, see API documentation.

2) Many users by default set the share permission to private, see whether your account has it private by default by going in Facebook settings.

0
votes

How about this

ShareDialog shareDialog = new ShareDialog(this);
if (ShareDialog.canShow(ShareLinkContent.class)) {
    ShareLinkContent linkContent = new ShareLinkContent.Builder()
            .setContentTitle("Title")
            .setContentDescription("Description")
            .setContentUrl(Uri.parse("Url"))
            .build();

    shareDialog.show(linkContent);
}