Skip to content

[amp-twitter] validation error when using data-theme without data-tweetid #20340

@abazeed

Description

@abazeed

What's the issue?

As mentioned in amp-twitter attributes reference, we can use one of the following attributes to determine the type of the amp-twitter component:

  • data-tweetid
  • data-momentid
  • data-timeline-source-type

I've used the following code to show the timeline of our Twitter account:

<amp-twitter width="1"
             height="5"
             layout="responsive"
             data-timeline-source-type="profile"
             data-timeline-user-id="143531181"
             data-theme="dark"
             data-chrome="noheader, nofooter, noscrollbar">
</amp-twitter>

But I've received the following validation error:

The attribute 'data-tweetid' in tag 'amp-twitter' is missing or incorrect, but required by attribute 'data-theme'.

Even if I added the data-tweetid, it will show this error:

Mutually exclusive attributes encountered in tag 'amp-twitter' - pick one of ['data-momentid', 'data-timeline-source-type', 'data-tweetid'].

How do we reproduce the issue?

  1. Open the AMP [Playground].
  2. Select the amp-twitter template.
  3. Paste the previous code in the body tag.
  4. You will get the validation error.

What browsers are affected?

I'm using Google Chrome 71.0.3578.98 (Official Build) (64-bit)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions