Developer / Documentation / Widgets

These tutorials describe working with the custom Netlog REST API we offer next to our OpenSocial implementation. If you'd like to use this API, please get in touch first.

Introduction

Widgets are blocks (pieces of HTML code) that users can add to their profile from another website (the partner website).
When the users surfs on the partner website, he finds a link (button or whatever) to add a widget of that partner website to his Netlog profile. The user specifies his Netlog nickname and submits it. The partner website then redirects the user to the Netlog API Login Page. After the user has logged in and the partner site is authenticated, the widget will be added to the Netlog profile.
From that moment on, the widget of the partner website exists on the profile of that user.

When a user has added a widget, it will show up in the activity logs of that user and his friends.

As a widget developer, you can also make use of our platform to make custom widgets before the widgets are placed on the profile of the user.
Placing a widget on a user profile, is also a method provided in our API. However, this method is only available for trusted partners. If you want to create widgets for Netlog, you will have to purchase a widget application ID by contacting Netlog directly.

Widget data

A widget has some specific data that can be changed by the developer of the widget on http://tr.netlog.com/go/developer/managewidgets/. This data consists of:
Application Name
The name of the widget that will be added to the users profile (can also be the name of the trusted partner).
Integration Page
The page on the partner website where the user can add the block to his profile. This URL has to be absolute and can also point to the main page of the partners website.
Callback Page
The page on the partner website used in the authentication of the widget
Description
A short description of the widget that specifies what the widget is all about. This information is used to inform the users about the widget.
Logo
This logo is used on the Netlog site on the widget discover page and the widget information page.
Preview image
This image is used as a preview of the widget in the profile page of the user. The widget starts playing when this logo is clicked. When your widget does not autoplay, this option can be turned off. The preview image, however, will still be used on the Netlog information page about the widget.

Add widget to a user profile

Before the partner can add a widget to the profile of a user, it has first needs to be authenticated (see authentication guide).

When the authentication procedure is succesfully concluded and you have acquired your ticket and apiServer, you can use that ticket for making calls to the API Server.
If you need custom Netlog data for building your widget, now would be the time to request that information and import it into your widget.
When the user has completed his widget, you can push he widget data to our servers using the widget.add method

Remarks

In order to avoid different widgets interfere with each other and the Netlog website, we recommend the following.
  • Make use of unique id's on your html-elements. For example, you could prefix the ids with a company specific tag.
  • In style sheets:
    • Make use of unique class names. For example, you could again prefix them with a company specific tag.
    • Don't overwrite the style of a html element outside your widget container.