-
-
Notifications
You must be signed in to change notification settings - Fork 311
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 Twitter pattern without subdomains #362
Comments
Ok, it seems it may be ok because the code in v3 branch is similar to the fix:
|
Is there any plans to upgrade embed to, at least, v3 sometime? (v4 would be amazing) All issues I have for v2 are from that drupal module :) Seems like the url_embed module has not been updated in years. |
I don't know but I can try to move this forward. Thanks! |
I have a strange issue. I'm using Embed URL, a Drupal module that requires another Drupal module, Embed, that uses this library.
The URL Embed module is supposed to allow embedding content using oEmbed. It works ok with several providers but not for Twitter's tweets. After a debugging sessions, it seems the URL is not detected properly because Embed\Providers\OEmbed\Twitter::getPatterns() returns just
'https?://*.twitter.com/*'
. This pattern doesn't match the standard tweet URL likehttps://twitter.com/USER/status/TWEET_ID
.The module works if I add a new pattern:
'https?://twitter.com/*'
.However, if you go to the test URL (https://oscarotero.com/embed/demo/index.php) and type a tweet URL it seems to work. For example:
https://oscarotero.com/embed/demo/index.php?url=https%3A%2F%2Ftwitter.com%2Fmetadrop%2Fstatus%2F1267734586525659138
This is the tweet I was having problems to display.
So, I don't understand what is happening. It seems tweets should not be displayed because match fails, as it happening in my Durpal installation, but the test URL indeed shows the tweet. If I 'fix' the patterns, the Drupal module works ok. I'm crating a PR, but I'm not really sure If this a proper fix.
The text was updated successfully, but these errors were encountered: