Skip to content

Commit 512a173

Browse files
authored
Merge pull request #406 from RedaktionsNetzwerk-Deutschland/fix/facebook-page-photos
fix(facebook): oembed for photos on pages does not work
2 parents 651ab0c + 78ff05e commit 512a173

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Adapters/Facebook/OEmbed.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,12 @@ private function getEndpointByPath(string $path): string
5353
https://www.facebook.com/media/set?set={set-id}
5454
https://www.facebook.com/questions/{question-id}
5555
https://www.facebook.com/notes/{username}/{note-url}/{note-id}
56+
57+
Not in the facebook docs:
58+
https://www.facebook.com/{page-name}/photos/{post-id}/{photo-id}
5659
*/
5760
if (strpos($path, '/photo.php') === 0
58-
|| strpos($path, '/photos/') === 0
61+
|| strpos($path, '/photos/') !== false
5962
|| strpos($path, '/permalink.php') === 0
6063
|| strpos($path, '/media/') === 0
6164
|| strpos($path, '/questions/') === 0

0 commit comments

Comments
 (0)