File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99class OEmbed extends Base
1010{
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 ' ;
11+ const ENDPOINT_PAGE = 'https://graph.facebook.com/v25 .0/oembed_page ' ;
12+ const ENDPOINT_POST = 'https://graph.facebook.com/v25 .0/oembed_post ' ;
13+ const ENDPOINT_VIDEO = 'https://graph.facebook.com/v25 .0/oembed_video ' ;
1414
1515 protected function detectEndpoint (): ?UriInterface
1616 {
1717 $ token = $ this ->extractor ->getSetting ('facebook:token ' );
1818
19- if (!is_string ($ token ) || $ token === '' ) {
20- return null ;
21- }
22-
2319 $ uri = $ this ->extractor ->getUri ();
2420 if (strpos ($ uri ->getPath (), 'login ' ) !== false ) {
2521 parse_str ($ uri ->getQuery (), $ params );
@@ -28,7 +24,7 @@ protected function detectEndpoint(): ?UriInterface
2824 }
2925 }
3026 $ queryParameters = $ this ->getOembedQueryParameters ((string ) $ uri );
31- $ queryParameters ['access_token ' ] = $ token ;
27+ if ( $ token ) $ queryParameters ['access_token ' ] = $ token ;
3228
3329 return $ this ->extractor ->getCrawler ()
3430 ->createUri ($ this ->getEndpointByPath ($ uri ->getPath ()))
Original file line number Diff line number Diff line change 88
99class OEmbed extends Base
1010{
11- const ENDPOINT = 'https://graph.facebook.com/v8 .0/instagram_oembed ' ;
11+ const ENDPOINT = 'https://graph.facebook.com/v25 .0/instagram_oembed ' ;
1212
1313 protected function detectEndpoint (): ?UriInterface
1414 {
1515 $ token = $ this ->extractor ->getSetting ('instagram:token ' );
1616
17- if (!is_string ($ token ) || $ token === '' ) {
18- return null ;
19- }
20-
2117 $ uri = $ this ->extractor ->getUri ();
2218 if (strpos ($ uri ->getPath (), 'login ' ) !== false ) {
2319 $ uri = $ this ->extractor ->getRequest ()->getUri ();
2420 }
2521
2622 $ queryParameters = $ this ->getOembedQueryParameters ((string ) $ uri );
27- $ queryParameters ['access_token ' ] = $ token ;
23+ if ( $ token ) $ queryParameters ['access_token ' ] = $ token ;
2824
2925 return $ this ->extractor ->getCrawler ()
3026 ->createUri (self ::ENDPOINT )
You can’t perform that action at this time.
0 commit comments