28 January, 2022 seen 664This is an article back from 2014, when I had the vision to launch a web agency in Tbilisi, Georgia. In the end, I didn…
Some time ago, I created a tutorial showing how you can add a Facebook like button to your Drupal powered site. That tutorial was pretty easy because we used a module. Today I'm willing to show, how to add Facebook share button to Drupal views page.
Go to Facebook developer center - https://developers.facebook.com/docs/plugins/share-button/
Generate your share button:
We will use HTML5.
Now open your custom text field and add HTML5 code from Facebook page, change url to [path] field:
<div class="fb-share-button" data-href="[path]" data-type="button_count"></div>
And in final you should get your views containing Facebook share button, with linking to each node in views. Save this view and display it in Drupal site using blocks.