Sociable Profile API

From CjWiki
Revision as of 02:15, 11 August 2019 by Corejoomla (talk | contribs) (Created page with "Category:Sociable == Prerequisites: == Add the required Sociable API library: <pre>require_once JPATH_ROOT.'/components/com_sociable/lib/api.php';</pre> Now get the profi...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Add the required Sociable API library:

require_once JPATH_ROOT.'/components/com_sociable/lib/api.php';

Now get the profile API:

$profileApi = SociableApi::getProfileApi();

Syntax: getUserProfile

Syntax of the getUserProfile API call to get full details of the user profile:

getUserProfile($identifiers, $forceReload = false)
$identifiers - int/array or ints
Single user id or array of user ids for which the user profile need to be fetched. If an array of user ids are given, the function will return an associative array of user profiles with user id as a key. Required parameter.
$forceReload - boolean
Force reload data from database instead of using cache