I'm trying to share a link(my Google Play app link) using ShareDialog from Facebook SDK but the problem is that when the URL is my app's Google Play link the other information is not displayed correctly... Actually it's displaying only the link from Google Play without name or description!
Here's the code:
FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder(
this)
.setLink("https://play.google.com/store/apps/details?id=<myapp>")
.setDescription("Test")
.setName("Test for facebook")
.build();
uiHelper.trackPendingDialogCall(shareDialog.present());
I tried everything and with other URL's actually is working(displaying name, description, caption etc.) but not with the app's URL.
Does anyone know why a Google Play link won't work with text, description or caption?
Actually if you specify the
contentUrl
(as in 4.0) orlink
(as in your case), it overrides thename
,description
, etc. You just don't need to give other things as it then becomes responsibility of url host to supply the details that should be shown when it gets posted on Facebook timeline.Although, if you want to share something like
Message from user
followed by yourapp link
. Then I would suggest to go for Graph API (I wasted 2-3 days in posting something like this via ShareApi/ShareDialog but ended up with using Graph API only.)Code to share using Graph API: