Skip to content

Commit

Permalink
fix(facebook): oembed for photos on pages does not work
Browse files Browse the repository at this point in the history
With this commit urls of scheme https://www.facebook.com/{page-name}/photos/{post-id}/{photo-id}
will use the oembed_post endpoint

resolves: oscarotero#405
  • Loading branch information
Dominik Jansen committed Nov 18, 2020
1 parent 651ab0c commit 78ff05e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Adapters/Facebook/OEmbed.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,12 @@ private function getEndpointByPath(string $path): string
https://www.facebook.com/media/set?set={set-id}
https://www.facebook.com/questions/{question-id}
https://www.facebook.com/notes/{username}/{note-url}/{note-id}
Not in the facebook docs:
https://www.facebook.com/{page-name}/photos/{post-id}/{photo-id}
*/
if (strpos($path, '/photo.php') === 0
|| strpos($path, '/photos/') === 0
|| strpos($path, '/photos/') !== false
|| strpos($path, '/permalink.php') === 0
|| strpos($path, '/media/') === 0
|| strpos($path, '/questions/') === 0
Expand Down

0 comments on commit 78ff05e

Please sign in to comment.