draugiem.lv page followers widget

draugiem.lv page followers widget

Positive changes occurred on very popular in Latvia social network – draugiem.lv not only in design, but also step forward was made and social widget using iframe was created for web pages, to be inserted into the blogs or other webs. It was possible to fetch followers using javascript in json format, but as news design was applied, it suddenly stopped to work. Actually, link to profile images is now missing. And, following best practice, neither preceeding warning, nor alternative was offered. At least I was unable to find them in the google, neither got reply to email from draugiem.lv

In old fashion it worked like this:

<script type="text/javascript" src="http://www.draugiem.lv/iinuu/js/fans/?count=9"></script>

D = {

    // par = "fans":[{"name":"x1","url":"/user/12345/"}            


Well known wordpress plug-in for draugiem.lv widget exists [2] on wordpress.org plug-ins web site, created by Rolands Umbrovkis [1]. As soon as previous code stopped to work, in a couple of days necessary changes was applied to plugin and this fact was announced in twitter.

In my case wordpress plug-ins was not a solution, so I looked in the code ;) And here I discovered, that new fashion draugiem.lv page followers retrieval code is slightly different, and now iframe is in use, and now it is very easy to be implemented into almost any web page.

This is not an official documentation!

Two ways:

1. javascript

<divi id="fans"></div>

<script type="text/javascript" src="http://www.draugiem.lv/api/api.js"></script>

<script type="text/javascript">

var fans = new DApi.BizFans( {

    name: '{lapas-nosaukums}',
    count: {skaits}

} );

fans.append( 'fans' );                         


2. iframe

<iframe src="http://www.draugiem.lv/business/ext/fans/?name={lapas_nosaukums}" 
        style="border:none; overflow:hidden; width:203px; height:357px;">

Accordingly {lapas_nosaukums} and {skaits} should be replaced by text and numeric values

Result can be observed here – on the left column.

[1] http://umbrovskis.com/
[2] http://wordpress.org/extend/plugins/draugiemlvlapas-fan-page/


» Rate it!


» Related articles

» Comments

anlita 2011-09-24 18:51
* mandatory
* not public
Besucherzahler ukraina brides
website counter
vimeo youtube     myspace facebook twitter
where to eat in riga?