| This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. The article is believed to be still valid for the original topic scope. |
Contents |
You can add widgets directly to the Dashboard manager with external links. The purpose of this function is to enable external Web sites and partners to add a "pick this widget" button to their site so their users can easily pick widgets to their own account to the WidSets service.
The function enables both the picking of widgets and setting widget parameters at the same time. Parameters can have, for example, the name of the widget and the feed URL that the widget polls.
The user can receive a fully functional widget to the Dashboard manager with through a "pick" button on any Web site. When clicking the link, the user is directed to a landing page for the widget or widgets where basic information of the pick and the WidSets service is presented.
The link base is http://www.widsets.com/addwidgets.
It is possible to add several widgets with the same HTTP link. The widgets are described in the link's request parameters. One widget can have many attributes and so all parameters are prefixed with a widget index number starting from 0.
Mandatory parameters of a widget description:
The ID of a certain widget can be found in the URL of the widget home page, for example http://www.widsets.com/widget/123.
Optional request parameters:
<index>.<any parameter name of the widget> = URLEncode(<desired value of the param>)
It is important to URLEncode the parameter value because values often contain URLs and other strings of text with special characters.
The landing page for the widget displays buttons for logging in with an existing account or registering a new account. After logging in or completing the sign-up process, the widgets from the external link are added to the Dashboard Manager.
Assume the following link will be displayed on a Web site:
http://www.widsets.com/addwidgets?0._id=24583&0.title=TSihvola's%20bookmarks&0.feedurlrss=http://www.widsets.com/user/11385/bookmarks.xml
After the user clicks the link and selects to log in on the landing page, the widget appears in the Dashboard manager. The widgetname parameter is set to "TSihvola's bookmarks" and the feedurlrss parameter is set to the URL "http://www.widsets.com/user/11385/bookmarks.xml".
Now the user can synchronize their device by clicking the "update phone" button and start using the widget.
Several widgets can be added with the same external link by separating them with the index number.
The following external link contains information for two widgets: Forum and Blog with the indices 0 and 1:
http://www.widsets.com/addwidgets?0._id=24583&0.title=Forum%20Stuff& 0.feedurlrss=http://www.widsets.com/forum/forum/1/feed.xml&1._id=1478
No related wiki articles found