Skip to content

Commit 96aab55

Browse files
authored
Merge pull request #370 from RedaktionsNetzwerk-Deutschland/feature/instagram-short-url
fix(instagram): add instagram short url pattern (instagr.am)
2 parents c35f948 + 702e65e commit 96aab55

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

src/Providers/OEmbed/Instagram.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ class Instagram extends EndPoint implements EndPointInterface
99
protected static $pattern = [
1010
'instagram.com/p/*',
1111
'www.instagram.com/p/*',
12+
'instagr.am/p/*',
1213
];
1314
protected static $endPoint = 'https://api.instagram.com/oembed';
1415

tests/InstagramTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,20 @@ public function testHttps()
3535
]
3636
);
3737
}
38+
39+
public function testShortUrl()
40+
{
41+
$this->assertEmbed(
42+
'https://instagr.am/p/ySl7G9tO_q/',
43+
[
44+
'title' => 'Se va llenando el lugar donde Tsipras dará su mitin. Aún pendientes de si Syriza logra la mayoría absoluta, pero ya seguros de la victoria de la izquierda.',
45+
'imageWidth' => 640,
46+
'imageHeight' => 640,
47+
'type' => 'rich',
48+
'authorName' => 'agarzoniu',
49+
'authorUrl' => 'https://www.instagram.com/agarzoniu',
50+
'providerName' => 'Instagram',
51+
]
52+
);
53+
}
3854
}

0 commit comments

Comments
 (0)