-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add amp-facebook element for Facebook posts and videos #1479
Conversation
}); | ||
|
||
|
||
function render(width, height) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably not a good name anymore, since this does not re-render. Might be best to just inline the function
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inlined.
Looks great. I think sharing the script is not as crucial as with tweets as it is not so common to have many of these posts on the same page (I think). |
// https://github.com/ampproject/amphtml/issues/728 | ||
// is being implemented. | ||
|
||
if (['facebook', 'twitter'].indexOf(data.type) !== -1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer something stupid like two comparisons with a ||
in between :)
Looks great. Some style nits. Will merge after fixing. |
Fixed and squashed! Thanks for the review! |
Thanks! LGTM |
Add amp-facebook element for Facebook posts and videos
I posted some of the decisions I made here in #979 but for ease of access, re-posting here: