Not seeing the updated content on this page! Hard refresh your browser to clean cache for this page (e.g. SHIFT-F5 on Windows Chrome)
language
: string the language for rendering the plugin buttons. If not set, defaults to en
. For the available languages supported by Twitter plugins, refer the
list of supported language codes
type
: string the Twitter plugin type to render. Defaults to TwitterPlugin::SHARE
. These can be one of the following values:
TwitterPlugin::SHARE
: string for embedding the Twitter Share button.
TwitterPlugin::FOLLOW
: string for embedding the Twitter Follow button.
TwitterPlugin::HASHTAG
: string for embedding the Twitter Hash Tag button.
TwitterPlugin::MENTION
: string for embedding the Twitter Mention button.
TwitterPlugin::TWEET
: string for embedding the Twitter Posts.
TwitterPlugin::TIMELINE
: string for embedding the Twitter Timeline (for user, list, search, or collection).
screenName
: string the Twitter Screen Name. This is mandatory for displaying the Twitter Follow & Mention buttons.
hashTag
: string the Twitter Hash Tag. This is mandatory for displaying the Twitter Hashtag button.
timelineConfig
: array the additional configuration options for timeline widget, if the type
is set to TwitterPlugin::TIMELINE
. One of the following options can be setup:
listSlug
: string, the list slug and applicable only if you want to use embedded list timeline. Refer embedded list timeline documentation for details.
search
: string, the search hash tag, if you want to use embedded search timeline. Refer embedded search timeline documentation for details.
collectionId
: string, the collection identifier, if you want to use embedded collection timeline. Refer embedded collection timeline documentation for details.
collectionName
: string, the collection name, if you want to use embedded collection timeline. Refer embedded collection timeline documentation for details.
settings
: array the configuration options for each twitter plugin setup as key value pairs. Refer the Twitter plugin documentation for details on configuring each plugin.
options
: array the HTML attributes for the main plugin. The data
api attributes in this array will be automatically set based on the settings
configuration.
noscript
: string/boolean text to be displayed if browser does not support javascript. If set to false will not displayed. Defaults to Please enable JavaScript to view the comments powered by twitter
.
noscriptOptions
: array the HTML attributes for the noscript message container. Defaults to ['class' => 'alert alert-danger']
social
module configuration level, for defaulting it across your application, and skip it in your widget calls. For example.
// your module config 'modules' => [ 'social' => [ // the module class 'class' => 'kartik\social\Module', // the global settings for the twitter widget 'twitter' => [ 'screenName' => 'TWITTER_SCREEN_NAME', ], ] // your call in your view/layout file echo TwitterPlugin::widget([]); // will use the twitter settings configured in module
yii2-social is released under the BSD-3-Clause
License. See the bundled LICENSE.md for details.
Comments & Discussion
Note
You can now visit the Krajee Webtips Q & A forum for searching OR asking questions OR helping programmers with answers on these extensions and plugins. For asking a question click here. Select the appropriate question category (i.e. Krajee Plugins) and choose this current page plugin in the question related to field.
The comments and discussion section below are intended for generic discussions or feedback for this plugin. Developers may not be able to search or lookup here specific questions or tips on usage for this plugin.