File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change 8
8
9
9
class OEmbed extends Base
10
10
{
11
- const ENDPOINT_PAGE = 'https://graph.facebook.com/v8 .0/oembed_page ' ;
12
- const ENDPOINT_POST = 'https://graph.facebook.com/v8 .0/oembed_post ' ;
13
- const ENDPOINT_VIDEO = 'https://graph.facebook.com/v8 .0/oembed_video ' ;
11
+ const ENDPOINT_PAGE = 'https://graph.facebook.com/v11 .0/oembed_page ' ;
12
+ const ENDPOINT_POST = 'https://graph.facebook.com/v11 .0/oembed_post ' ;
13
+ const ENDPOINT_VIDEO = 'https://graph.facebook.com/v11 .0/oembed_video ' ;
14
14
15
15
protected function detectEndpoint (): ?UriInterface
16
16
{
@@ -21,6 +21,12 @@ protected function detectEndpoint(): ?UriInterface
21
21
}
22
22
23
23
$ uri = $ this ->extractor ->getUri ();
24
+ if (strpos ($ uri ->getPath (), 'login ' ) !== false ) {
25
+ parse_str ($ uri ->getQuery (), $ params );
26
+ if (!empty ($ params ['next ' ])) {
27
+ $ uri = $ this ->extractor ->getCrawler ()->createUri ($ params ['next ' ]);
28
+ }
29
+ }
24
30
$ queryParameters = $ this ->getOembedQueryParameters ((string ) $ uri );
25
31
$ queryParameters ['access_token ' ] = $ token ;
26
32
You can’t perform that action at this time.
0 commit comments