Difference between revisions of "Vz.advertising"

From VZ Developer Wiki
Jump to: navigation, search
m (Methods)
(Examples)
Line 40: Line 40:
 
</source>
 
</source>
  
 +
 +
<source lang="javascript">
 +
vz.advertising.postBadge('http://www.example.com/i/badge.jpg', 'my title', 'my description',
 +
'http://www.example.com/ad', function(badgeId) {
 +
    //do something with the returned badgeId
 +
});
 +
</source>
  
 
{{ VZspecificApis}}
 
{{ VZspecificApis}}

Revision as of 08:20, 27 January 2011

General Guidelines | XML Specification | Features | Views | JavaScript API | REST API | Tutorials | OAuth


vz.advertising

VZ specific methods get advertising tags. For further details please contact our partner support.

Methods

vz.advertising.getAdTag

vz.advertising.getAdTag(adCode, callback)
returns full ad tag for a given ad code
Parameters
Integer adCode ad code which you got from our partner support
callback - callback which is called with the generated ad tag as parameter

vz.advertising.getPaymentInterstitial

vz.advertising.getPaymentInterstitial(callback)
shows a payment interstitial with legal information
Parameters
callback - callback which is called with a boolean as first parameter to indicate if the user accepted the legal information or not

vz.advertising.postBadge

This feature will be available on 01.02.2011
This feature has to be enabled by our support team. [1]
vz.advertising.postBadge(badgeUri, badgeTitle, badgeDescription, link, callback)
returns created badge id or false on error
Parameters
String badgeUri the full url to badge image (e.g. http://www.example.com/images/example.jpg, param has to be url encoded)
String badgeTitle a short badge title (optional)
String badgeDescription a description (optional)
String link a link to an external or internal resource (e.g. http://www.myhomepage.com), which will be called on a (badge)click on the users profile (optional, param has to be url encoded)
callback - callback which is called with an integer of the created badge id or boolean false on error
The user can immediately select the earned badge for his profile, even if you place a link (best use target=_blank, to not lose focus) from your App to the users badge management page: http://www.studivz.net/Badges/EditBadges/{yourGadgetId}/4 (replace your gadgetId with the integer value of your gadget id (NOT the returned badge id).

Examples

vz.advertising.getAdTag(YOUR_AD_CODE, function(tag) {
   //do something with the returned tag
});


vz.advertising.postBadge('http://www.example.com/i/badge.jpg', 'my title', 'my description',
'http://www.example.com/ad', function(badgeId) {
    //do something with the returned badgeId
 });


VZspecific APIs

gadgets.cache

gadgets.tracking

vz.advertising

vz.invite

vz.embed

vz.flash

vz.vcard