Now that we understand what OpenLike is and how you can use it, let’s take a look at how to integrate the widget on your own sites. The process is quick and painless, and at a base level, involves only three elements:
An HTML page title
The script include
Here’s what the code looks like:
Basically, we have a simple HTML page that includes the title that
we want to use for the like event
as the shell. Next, we have the script include that introduces the
OpenLike library to the page. The source of the library should be http://openlike.org/v1/openlike.js. Finally, we simply
make a call to
wherever we want to render the widget.
Once you’ve installed the OpenLike widget, the user can “like” your page through a number of different web sources. Figure 2-4 displays a simple implementation of numerous different sharing mechanisms for the associated sites.
Figure 2-4. How ...