Twitter Widget

From Livestream » User Guide

Jump to: navigation, search

The Twitter Social StreamWidget is an HTML widget that can be embedded as an iframe into your web application and allows you to integrate twitter chat with your Livestream channel. This is ideal to enable your viewers to chat over Twitter but will also promote links to your stream in Twitter to build your audience. If you have a Livestream Premium account, you will be able to use it to build followers to your Twitter account.

There are a set of querystring parameters that can be used to control the twitter widget. They are as follows:

Example usage - cut and paste + replace channel name :

<iframe src="http://www.livestream.com/twitterwidget?channel=testchannel" frameborder="0" scrolling="no" width="350px" height="700px">Sorry your browser does not support IFRAME</iframe>


Click here for a live example.


Image:TwitterWidgetNonpremium.png

Livestream Free channels will show a "powered by Livestream" and do not have access to the following feature : - account - Customize the account which the user is asked to follow (default is @livestreamcom) - url - Customize the URL link to the channel. Default is www.livestream.com/[channelname] - searchparam - Customize the # or @ tag inserted in the chat tweets and used to show the list of tweets in the widget. Default is #[channelname]

Livestream Premium channels can customize the account, url and searchparam parameters as they wish. Also the widget doesn't show the 'powered by Livestream' logo and link (White-label)


<iframe src="http://www.livestream.com/twitterwidget?channel=testpremiumchannel&account=@biz&searchparam=@biz&url=http://www.bizstone.com/" frameborder="0" scrolling="no" width="350px" height="700px">Sorry your browser does not support IFRAME</iframe>


Click here for a live example.


Image:TwitterWidgetpremium.png



Parameter Description Required?
channel=[channelname] Insert the name of a Livestream channel. Mandatory.
url=[URL link] This is the URL that would appear after the tweet in twitter.com. This would enable twitter users to click on your URL which would bring them to your web site. E.g. If you tweet "Hello world" from the twitter widget, then the message would appear as "Hello world (@livestreamcom live on www.livestream.com)", where @livestreamcom is the account parameter and www.livestream.com is the url parameter. Restricted to Premium channels. Default : www.livestream.com/[channelname].
searchparam=[Twitter search param] This parameter is used to search twitter.com using the twitter api and the results are displayed in the widget. E.g. if searchparam is @livestreamcom, then the tweets containing @livestreamcom are searched for and displayed in reverse chronological order. In order to enter multiple search terms you will need to use a URL escaper like this one. Restricted to Premium channels. Default : #[channelname]
account=[Twitter account name] This is usually your twitter account. In most cases, it would be the same as searchparam. The users would also see a link to follow the twitter user on twitter.com determined by the account parameter. TRestricted to Premium channels. Default : @livestreamcom
refresh=[value in seconds] This parameter controls the refresh rate (in seconds) of the twitter widget. E.g. if this parameter is set to 20, then tweet messages seen in the widget are refreshed once every 20 seconds. This parameter is optional. If not specified, then the default is 10 seconds.
results=[number of results] The maximum number of tweets shown in the widget. This parameter is optional. If not specified, then the default value is 10 seconds.
delay=[value in seconds] The delay in seconds before which a tweet cannot be made after a successful tweet. A count down will be displayed starting from this value once a tweet is made. Once the count down reaches 0, the twitter widget is enabled to make another tweet This parameter is optional. If not specified, then the default value is 30 seconds. This value has to be at least 10 seconds or more. If less than 10 seconds, then it will default to 10 seconds.
mode=question Change the title of the widget to "Ask A Question Over Twitter". Ideal to encourage the audience to ask questions instead of chatting. This parameter is optional.
showchat=false When showchat is set to false. The widget doesn't show the chat/questions search results. Ideal to use with mode=question when you prefer not to show the question on your page. You can use search.twitter.com and search your searchparam to find the questions posted by your viewers. This parameter is optional.


Example usage with some parameters :

<iframe src="http://www.livestream.com/twitterwidget?channel=testpremiumchannel&url=www.livestream.com.com&searchparam=livestream&refresh=10&account=livestreamcom&results=20&delay=30" frameborder="0" scrolling="no" width="350px" height="700px">Sorry your browser does not support IFRAME</iframe>


Click here for a live example.


Image:TwitterWidget.png