Question

On the user's Facebook wall, when I publish a share using the FacebookShareDialog the top line does not show the Application Name as it should. It just shows USERNAME shared a link via . (note the period and no Application Name). This is not an issue on the feed, but does affect others users if they view my wall directly.

Blank application name in Facebook share

Here is the code I am using:

if (FacebookDialog.canPresentShareDialog(getApplicationContext(), FacebookDialog.ShareDialogFeature.SHARE_DIALOG)) {
                    FacebookDialog shareDialog = new FacebookDialog.ShareDialogBuilder((Activity) context)
                        .setLink(Constants.SHARE_URL)
                        .setName(Constants.SHARE_TITLE)
                        .setCaption(Constants.SHARE_CAPTION)
                        .setApplicationName(getString(R.string.app_name))
                        .build();
                    uiHelper.trackPendingDialogCall(shareDialog.present());
                } else {
                    final Intent shareIntent = BaseUtils.getShareIntentForUrl(Constants.SHARE_URL, Constants.SHARE_TITLE);
                    Intent.createChooser(shareIntent, getResources().getString(R.string.share_intent_title));
                    startActivity(shareIntent);
                }`

So my question is, how do I fill in the Application Name in that line? It fills in appropriately in share posts when other users see it on their wall, so I know the Facebook Share Dialog is "getting" the name.

Was it helpful?

Solution

I have found that this is a known Facebook bug, rather than specific to the Facebook Android SDK, as it happens for other apps as well.

https://developers.facebook.com/x/bugs/640453342670536/

PHP StackOverflow question: Posting to user's wall with Facebook PHP SDK - how to populate "shared a link via BLANK"?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top