Skip to content

Commit 78ff05e

Browse files
author
Dominik Jansen
committed
fix(facebook): oembed for photos on pages does not work
With this commit urls of scheme https://www.facebook.com/{page-name}/photos/{post-id}/{photo-id} will use the oembed_post endpoint resolves: #405
1 parent 651ab0c commit 78ff05e

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)