How implement api almetric OJS 3.1.1

Hi all

I want to know how I can implement the api almetric in OJS 3.1.1 thank you very much for the help

Hi @christian_criollo

What exactly do you mean with “api almetric” ?

Best,
Bozana

Hi Bozana

this link Embeddable badges | Altmetric API documentation can help you to know what i mean

Hi all

someone can i help you thanks

Hi @christian_criollo

It seems that if your case is clear with them, and your articles have a DOI, you would only need to add those two lines of code on your article page. You could either implement a plugin that would do that (e.g. use the hook Templates::Common::Footer::PageFooter there), or (maybe first try to) add it to the template https://github.com/pkp/ojs/blob/master/templates/frontend/objects/article_details.tpl, or create a child theme where you will override that template (s. https://pkp.gitbook.io/pkp-theming-guide/en).
In the template you can get the article DOI with: $article->getStoredPubId('doi');

Best,
Bozana

What should be the code for URL that I should add in the template? I have already added DOI code and it works. But URL code is also important since many authors uses URLs and not DOIs.