Add “Page Title” in Facebook Share button
-
Please can you add by default the field “title” (with Worpdress Page Title) in Facebook button share?
It works with this mod in “ssba_buttons.php”:
// get facebook button function ssba_facebook($arrSettings, $urlCurrentPage, $strPageTitle, $booShowShareCount) { // if the sharethis terms have been accepted if ($arrSettings['accepted_sharethis_terms'] == 'Y' && $arrSettings['facebook_app_id'] != '') { // facebook share link $htmlShareButtons = '<a data-site="" data-facebook="mobile" class="ssba_facebook_share" data-href="'.$urlCurrentPage.'&title='.$strPageTitle.'" href="https://www.facebook.com/dialog/share?app_id='.$arrSettings['facebook_app_id'].'&display=popup&href='.$urlCurrentPage.'&redirect_uri='.$urlCurrentPage.'" ' . ($arrSettings['ssba_share_new_window'] == 'Y' ? ' target="_blank" ' : NULL) . ($arrSettings['ssba_rel_nofollow'] == 'Y' ? ' rel="nofollow"' : NULL) .'>'; } else { // facebook share link $htmlShareButtons = '<a data-site="" class="ssba_facebook_share" href="https://www.facebook.com/sharer.php?u=' . $urlCurrentPage . '&title='.$strPageTitle.'" ' . ($arrSettings['ssba_share_new_window'] == 'Y' ? ' target="_blank" ' : NULL) . ($arrSettings['ssba_rel_nofollow'] == 'Y' ? ' rel="nofollow"' : NULL) .'>'; }
This is because when i click on Facebook share button in the sharing box the title is web site name and not the specific page title that i share.
- The topic ‘Add “Page Title” in Facebook Share button’ is closed to new replies.