Skip to content
Tim Whitacre edited this page Feb 26, 2014 · 1 revision
Name Path
oEmbed Helper /application/helpers/oembed_helper.php

These methods pull data in for the saved URL to present content about the mark.

For this we use the service Embed.ly to handle the processing of the URL.

In order to use this you need to signup for a free account and then add you API key.

You can find the API config setting under /application/config/all/app.php towards the bottom.

Replace $config['embedly_api_key'] = ''; with $config['embedly_api_key'] = 'YOUR_API_KEY';.

Load the helper

$this->load->helper('oembed');

Methods

oembed

Processes the URL and returns content.

Arguments

Variable Type Default Required Description
$url string N/A Yes The URL to process
$key string N/A Yes The API key for Embed.ly (see above)

checkOEmbedUrl

A method containing a list of whitelisted URl's so the service is not checking every URL. Feel free to add your own.

Arguments

Variable Type Default Required Description
$url string N/A Yes The URL to check against