FUEL CMS User Guide : Version 1.5.2


Social Class

There is a fuel/application/config/social.php configuration file for the preferred share URLs.

Properties Reference

Property Default Value Description
public
share_urls
array()
og
array()
protected
CI N/A

Function Reference [+]

$this->social->initialize([$params=array()])

Initialize the object and set object parameters. Accepts an associative array as input, containing object preferences. Also will set the values in the parameters array as properties of this object.

Returns

void

Parameters

(array) $params Config preferences

$this->social->set_params($params)

Set object parameters.

Returns

void

Parameters

(array) $params Config preferences

$this->social->add_share_url('$key', '$url')

Set a share URL.

Returns

object The Social object instance itself to make it chainable

Parameters

(string) $key The key (e.g. twitter, facebook, linkedin..etc)
(string) $url The url which should include placeholders to swap out with passed data

$this->social->share('$type', ['$values'=NULL])

Returns a share URL.

Returns

string The translated URL

Parameters

(string) $type The type (e.g. twitter, facebook, linkedin..etc)
(mixed) $values An array or object of values

$this->social->og([$values=array()])

Creates open graph meta tags.

Returns

string An array of values

Parameters

(mixed) $values An array or object of values with keys being title, url, description, image, site_name, or type