Social Share and Metadata in Blockcerts

Can anyone offer advice/explanation on how the data needs to be inserted into your certificates to display the social share buttons and the metadata. I think it needs to be under metadataJson but haven’t had much success.

1 Like

I am trying to figure also anybody? Where is the metadatajson

metadataJson is part of the customisation of the context, as you will be able to see here: https://raw.githubusercontent.com/blockchain-certificates/blockcerts-verifier/master/test/fixtures/mainnet-valid-2.0.json
This is a variation of Blockcerts that has been specific to Learning Machine issued certificates. However you may also use, provided you define the key in the context.

@ampatt97, to display the social share and metadata json buttons, you need to set the corresponding attribute on the blockcerts-verifier on your page. ie:


https://github.com/blockchain-certificates/blockcerts-verifier/blob/master/demo/show-metadata.html.
I think I will be stating the obvious, but you need to set both flag if you want to activate both functionalities.

Social share then uses the record link: https://github.com/blockchain-certificates/blockcerts-verifier/blob/master/src/components/molecules/SocialShare/SocialShareContainer.js#L11, so no further configuration required.
Metadata will show your certificate.metadataJson property https://github.com/blockchain-certificates/blockcerts-verifier/blob/master/src/components/molecules/Metadata/MetadataContainer.js#L6. You will need to define this property in the context of the certificates.