We're using the social sharing wizard to share pages with four social networks (hopefully more in the future). A user is reporting an issue sharing a given page on Facebook that is not an issue for me. I do think that the likely reason for the error is that one or more of the social sharing wizard fields contains too much text. What I don't know is exactly how to fill out the social network wizard fields for optimal sharing to all possible networks.
We've set the following:
data-title - Formatted for use by Twitter. Unfortunately, this shows up as the title for LinkedIn, but not Facebook.
data-summary - The main text of the page (most pages won't have that much text)
data-url - Set to the URL of the page we're sharing
You can see the problem page here:
https://spacespeak.com/Messages/173We do have plenty of OpenGraph and Twitter-specific meta tags and these do appear to be read. For example, the og:title meta tag overrides the data-title field on Facebook.
What's the proper course of action here? Should we refrain from filling out data-summary altogether and just leave that to Facebook to get from the OpenGraph tags? Will that have negative consequences for sharing with other networks? Is there some way to specify network-specific fields for title and summary?
Answers
Yes, one way is to specify the data-title and/or data-summary attributes per social network.
For example in (taken from the wizard):
<div class="oas_box oas_box_btns_s" data-title="testing title" data-summary="testing description"> <span class="oas_btn oas_btn_linkedin" title="Send to LinkedIn"></span>
you could add these data-* attributes to a <span> element.
If placed on both the <div> and span, then <span> takes precedence. This allows you to have defaults.