Integrating Sulia Channels into your Website
There are two ways to integrate Sulia channel content into your website: using a widget and calling the API. Calling the API gives you more flexibility to control the user experience while using the widget is as simple as updating a template. The complete documentation for the API is on http://apiwiki.tlists.com/w/page/4896737/TLists-API-Documentation
Calling the API
By making a single call to an API endpoint, you can retrieve the contents of a channel, including the text of each tweet and all the information about the Tweeter necessary to display things as they appear on Sulia.com. The url for the endpoint is
http://api.tlists.com/api/v2/channels/<slug>/tweets.json
<slug> is the channel identifier. e.g. "python" for the Python programming language channel
There are two important but optional query parameters:
- count: maximum # of results returned. The default is 200
- since_id: the twitter id of the tweet after which you want all content to be returned. The default is a value of 0. This parameter is useful for requesting updates after an initial page load.
Our API is rate limited, so you should request and always provide an api key.
For example, to get the 100 most recent tweets from the Python channel using the api key ‘12345’ (yours will be different):
http://api.tlists.com/api/v2/channels/python/tweets.json?app_key=12345&count=100
To get tweets newer than # 67890 from the Unrest in Iran channel:
http://api.tlists.com/api/v2/channels/unrest-in-iran/tweets.json?since_id=67890&app_key=12345
Using a Widget
Our real-time content widget can be added to an html page using an iframe. The source url for the basic widget with the critical parameters filled in is
http://www.sulia.com/widget/v2?slug=<slug>&name=<widget-name>&app_key=<api key>
<slug> is defined above. <widget-name> is the name you want the widget to have on your webpage.
Additional, optional parameters allow you to control the appearance of the widget. We also have various widget designs to choose from. Contact us for more information about these and custom styling options.
For example, to display a 300 x 600 pixel widget titled “Stylish Tweets” with content from the New York Fashion Week channel and using the api key 12345, you would include this iFrame in your page:
<iframe src="http://www.sulia.com/widget/v2?app_key=12345&slug=new-york-fashion-week&title=Stylish%20Tweets" width="300" height="600" scrolling="no" align="top" frameborder="0" />
Comments (0)
You don't have permission to comment on this page.