Stream.renderCommentsWidget

From Social ID Developers
Revision as of 18:36, 6 June 2016 by Ramon.maciel (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

Description

Renders the Comments Widget within a DOM element.

Usage

 stream.renderCommentsWidget(containerId, options)

Parameters

containerId required Id of the DOM element where the widget will be inserted.
options optional object containing additional parameters.
loadCss optional boolean indicating if the widget should load a CSS file. Default: true.
cssUrl optional URL of an alternative CSS file to be loaded. Default: default theme CSS file.
read_only optional boolean indicating if the widget should not render post creation UI. Default: false.
create_only optional boolean indicating if the widget should not render post list UI. Default: false.
providers optional array of providers to use for login and share. Default: ["facebook", "gplus", "twitter", "linkedin"]
required optional array of required post creation fields. Default: requires at least one of the fields to not be empty.

Example

It renders the Comments Widget within the "comments-container" with Facebook, Twitter, LinkedIn and Google+ available to login:

 socialid.login.init(134, {loginType: "event"});
 var stream = socialid.comments.getStream(2, "streamIdentifier");
 stream.renderCommentsWidget("comments-container", {
   providers: ["facebook", "gplus", "twitter", "linkedin"]
 });
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox