Skip to content

Commit d7f4e2f

Browse files
authored
Merge pull request #274 from Berdir/twitter
Added a Twitter oembed provider to use the publish.twitter.com subdomain
2 parents 40d6bda + c5bfe60 commit d7f4e2f

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

src/Providers/OEmbed/Twitter.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
namespace Embed\Providers\OEmbed;
4+
5+
use Embed\Url;
6+
7+
class Twitter extends OEmbedImplementation
8+
{
9+
/**
10+
* {@inheritdoc}
11+
*/
12+
public static function getEndPoint(Url $url)
13+
{
14+
return 'https://publish.twitter.com/oembed';
15+
}
16+
17+
/**
18+
* {@inheritdoc}
19+
*/
20+
public static function getPatterns()
21+
{
22+
return ['https?://*.twitter.com/*'];
23+
}
24+
}

0 commit comments

Comments
 (0)