Hello,

The project page says oEmbed provider is supported.
Are OpenGraph and Twitter Cards not supported?

The embed library support boths (and others as well): https://github.com/oscarotero/Embed/tree/master/src/Providers

Why doesn't this module support those providers, and is there a plan to support them?

Thanks!

Comments

dolu created an issue. See original summary.

ludo.r’s picture

Title: OpenGrpah or Twitter cards providers? » OpenGraph or Twitter cards providers?
ludo.r’s picture

Ok, I just found out that the module only uses the code property:

The code to embed the image, video, etc

          if ($info = $this->urlEmbed()->getEmbed($url)) {
            $element[$delta] = array(
              '#type' => 'inline_template',
              '#template' => $info->getCode(), //here you can try $info->getTitle()
            );
          }

So one should just make use of other available properties as defined here:
https://github.com/oscarotero/Embed#usage

The question is: how to provide a flexible way to customize the output.

ludo.r’s picture

Status: Active » Fixed

I created a patch that allows to override the output of the link formatter #2986873: Provide a themable output for link field formatter

So to answer this issue:
- Opengraph or Twitter Cards are supported out-of-the-box
- Only the code property is used for now (embed code if any)
- If you want to output title/image/description you can't unless you patrch the module. See #2986873: Provide a themable output for link field formatter

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.