-
Notifications
You must be signed in to change notification settings - Fork 11k
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
Embedded tweets don't display properly #314
Comments
I just removed the quotes. Can you suggest a layout for tweet embeds? |
Why not using default Twitter cards layout? Without images / conversation = none / cards = hidden With that little blockquote bar (on the left) blue? |
Looks great, I didn't know this style guide. We need to create a specific template to render twitter oembeds and see what data was extracted from link source to metadata and see if we have all information to mount a card like that. Do you want to help us creating this new template in the oembed package? |
HTML teamplate or psd template? |
HTML, but I'm working on it now. |
I just have time to do things like this in weekends, sorry... :( |
Unfortunately the tweet page does not provide all necessary informations via meta tags as you can see below. I started a branch with initial templates for twitter render: https://github.com/RocketChat/Rocket.Chat/tree/twitter-oembed {
"url": "https://twitter.com/Interior/status/463440424141459456",
"meta": {
"pageTitle": "US Dept of Interior no Twitter: "Sunsets don't get much better than this one over @GrandTetonNPS. #nature #sunset http://t.co/YuKy2rcjyU" .",
"ogType": "article",
"ogUrl": "https://twitter.com/Interior/status/463440424141459456",
"ogTitle": "US Dept of Interior on Twitter",
"ogImage": "https://pbs.twimg.com/media/Bm54nBCCYAACwBi.jpg:large",
"ogImageUserGenerated": "true",
"ogDescription": "“Sunsets don't get much better than this one over @GrandTetonNPS. #nature #sunset”",
"ogSiteName": "Twitter",
"fbAppId": "2231777543"
},
"headers": {
"contentLength": "265900",
"contentType": "text/html;charset=utf-8"
},
"parsedUrl": {
"host": "twitter.com",
"hash": null,
"pathname": "/Interior/status/463440424141459456",
"protocol": "https:",
"port": null,
"query": null
}
} |
I wish I knew what exactly changed, because in the beginning everything was fine, |
In the past we used an external plugin to create oembed, but this plugin created many problems with rendering, so we decide to create our own plugin to have more control about render. Probable the old plugin uses the Twitter API to mount this card, and do this in render time, we changed the approach to request the posted url and save headers of the request and meta tags of HTML, is the same approach that facebook does to get information about links. Maybe we need to improve the meta "extractor" to handle twitter urls and call the twitter's api to get more information. |
I am closing this issue due lack of activity in a long time. If this is still a problem please open a new issue with updated details and tested against the latest version of rocket.chat. Thanks! |
Bring 0.63 to our customers
Set app user model id to improve notifications
Develop pwa catchup
They used to display normally in blue box, now they don't, and display characters that shouldn't be displayed (")
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: