protected function FacebookFetcher::getApiEndpointUrl in Media entity facebook 3.x
Same name and namespace in other branches
- 8.2 src/FacebookFetcher.php \Drupal\media_entity_facebook\FacebookFetcher::getApiEndpointUrl()
- 8 src/FacebookFetcher.php \Drupal\media_entity_facebook\FacebookFetcher::getApiEndpointUrl()
Return the appropriate Facebook oEmbed API endpoint for the content URL.
Parameters
string $content_url: The content URL contains the URL to the resource.
Return value
string The oEmbed endpoint URL.
1 call to FacebookFetcher::getApiEndpointUrl()
- FacebookFetcher::getOembedData in src/
FacebookFetcher.php - Fetch and return response from Facebook's oEmbed API endpoint.
File
- src/
FacebookFetcher.php, line 148
Class
- FacebookFetcher
- Class FacebookFetcher.
Namespace
Drupal\media_entity_facebookCode
protected function getApiEndpointUrl($content_url) {
if (preg_match('/\\/videos\\//', $content_url) || preg_match('/\\/video.php\\//', $content_url)) {
return 'https://graph.facebook.com/v10.0/oembed_video';
}
else {
return 'https://graph.facebook.com/v10.0/oembed_post';
}
}