0

I am working on a Drupal 8 site. I added fblikebutton to my articles to enable users to like content.

Is it possible to get the number of likes for each article as field? I am using the Views module to show the latest 3 articles, as in the following screenshot.

enter image description here

0

Probably setting the layout to button_count will do all the magic ;) This should be available in settings, or can be changed in MYTHEME_preprocess_fblikebutton.

Or use modules which provide this functionality, like:

  • thank you for the answer , about the 2 modules you suggested are not available for D8 , but for your first recommandation can you please drop some tutorial links? – Meher Jebali Apr 19 '16 at 8:38
  • sorry - i missed the 8 - and added two with a D8 version. in the code of all these modules you find the API calls. for using the existing module have a look at fblikebutton.html.twig and it's preprocess function. – rémy Apr 19 '16 at 8:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.