Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Facebook API October 24th changes #399

Conversation

reflexxion
Copy link
Contributor

@reflexxion reflexxion commented Oct 29, 2020

As described in #392 facebook did change it's API for oembed and now requires a access_token for getting oembed data.
@oscarotero prepared Extractors for this case but the settings could only be set "too late".
48e3918

With this PR it's now possible to provide the settings to the ExtractorFactory.

                $embed = new Embed\Embed();
                $extractorFactory = new \Embed\ExtractorFactory(
                    [
                        'instagram:token' => '1234|5678',
                        'facebook:token' => '1234|5678',
                    ]
                );
                $embed->setExtractorFactory($extractorFactory);
                $embed->get($url);

solves #392

@oscarotero
Copy link
Owner

Thanks for this pull request. This have a lot of changes, some related with code style and not with Facebook/Instagram issue. I'm not sure about all changes, so I'm going to leave comments.

@reflexxion reflexxion force-pushed the bugfix/facebook-api-24th-oct branch from 2ba4005 to e44d8fa Compare November 3, 2020 08:09
@reflexxion reflexxion force-pushed the bugfix/facebook-api-24th-oct branch from e44d8fa to 9e6a47b Compare November 3, 2020 08:10
@reflexxion reflexxion requested a review from oscarotero November 3, 2020 08:27
@oscarotero oscarotero merged commit 0d47d1f into oscarotero:master Nov 3, 2020
@reflexxion reflexxion deleted the bugfix/facebook-api-24th-oct branch November 4, 2020 06:37
@BSimon47
Copy link

BSimon47 commented Jan 4, 2021

I guess I am missing something!

While this thread indicates that the Facebook issue is "Fixed", when I run composer update embed/embed I do not see any update. All that shows up is a patch referencing Vimeo which fails to install.

I expect to see a "configure" link under the url_embed module in the "Extend" list on my Drupal Admin page in which to enter my Facebook credentials. But none exists. OR is there some other means to enter this information?

@oscarotero
Copy link
Owner

@BSimon47 Drupal module uses Embed 3.x and this PR is for Embed 4.x
The requirement of a api key for facebook was fixed in Embed v3.4.9.
The instructions to configure Embed in v3 are here: https://github.com/oscarotero/Embed/tree/v3.x#example-with-all-options
If you are using the Drupal module, I don't know how to configure it, but I guess there're a way to set an array of options.

@BSimon47
Copy link

BSimon47 commented Jan 5, 2021 via email

@oscarotero
Copy link
Owner

Hi, @BSimon47

Happy 2021 and yes, I received your "beers" Thank you very much!

Unfortunally, I don't have any expertise in Drupal and never was involved in Drupal development. I just created this library for a specific project and eventually it stated gaining popularity and Drupal is now using it for that plugin.

Looking at the plugin repo: https://git.drupalcode.org/project/url_embed, looks like there isn't much activity so if your project depends heavily on it, I'd recommend to fork and update it by yourself. It seems like there's, indeed, a way to configure it (I'm seeing the code), so I guess you can set somewhere the api token needed for Facebook.

Sorry, but I can't help you.

@BSimon47
Copy link

BSimon47 commented Jan 5, 2021 via email

@oscarotero
Copy link
Owner

@BSimon47 I mean fork (create a copy) the drupal module, not this repository.
Anyway, I guess you need help (or hire someone) that know Drupal. Your problem is not this library (Embed), but the drupal module (url_embed) that uses this library and I cannot help you with that.
Try to contact with Dave Reid, as you said.

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.

3 participants