Skip to content

Conversation

lozeone
Copy link

@lozeone lozeone commented Dec 15, 2020

Ok so, here is the fix I needed to get v3.x working with Facebook.

The issue here is that some facebook urls that are redirecting to the login page and then returning a "invalid parameter" error from FB, Because you cant embed the login page. It a little strange and inconsistent, sometimes they redirect other times they don't.

Ones in this old format tend to work
https://www.facebook.com/permalink.php?story_fbid={post-id}

While the same one using the current format do not.
https://www.facebook.com/*/posts/{post-id}

To fix this I added a pattern for "www.facebook.com/login/*" to the Redirects.php class and get the intended url from the "next" parameter. This resolves the issue for me.

original issue here #415

@lozeone
Copy link
Author

lozeone commented Dec 15, 2020

I'm working on Drupal integration with this library for the url_embed module and this final PR gets this working with that module.
See: https://www.drupal.org/project/url_embed/issues/3177860#comment-13936596

Can you make a new new 3.x release once this is in so we can update our composer requirement?

Thanks!

@oscarotero oscarotero merged commit f4ce26e into php-embed:v3.x Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants