Follow

Web Embed Methods & Events

Methods 

PostanoEmbed

Get
var embed = PostanoEmbed.get("projectId-productId");

SetId

embed.setId(accountID, projectID, productID);

Load
embed.load();

PostanoControl

Get
var control = PostanoControl.get("projectId-productId");

SetId

control.setId(accountID, projectID, productID);

Load
control.load(); 

Events

Widget Created
embed.on(Postano.Events.widgetCreated, function (data) {
console.log("EVENT: widgetCreated");
});


Widget Destroyed
embed.on(Postano.Events.widgetDestroyed, function (data) {
console.log("EVENT: widgetDestroyed");
});

Posts Load Pending
embed.on(Postano.Events.postsLoadPending, function (data) {
console.log("EVENT: postsLoadPending");

});
Posts Loaded
embed.on(Postano.Events.postsLoaded, function (data) {
console.log("EVENT: postsLoaded");
});
Posts Loaded At End
embed.on(Postano.Events.postsLoadAtEnd, function (data) {
console.log("EVENT: postsLoadAtEnd");
});
Card Open
embed.on(Postano.Events.cardOpen, function (data) {

console.log("EVENT: Card open for post: " + data.post.post_id);
});
Card Close
embed.on(Postano.Events.cardClosed, function (data) {
console.log("EVENT: Card closed for post: " + data.post.post_id);
});

Card Card Next
embed.on(Postano.Events.cardNext, function (data) {
console.log("EVENT: Next post: " + data.post.post_id);
});
Card Previous
embed.on(Postano.Events.cardPrevious, function (data) {
console.log("EVENT: Previous Post: " + data.post.post_id);
});
Card Sharing Controls
embed.on(Postano.Events.cardShare, function (data) {
console.log("EVENT: Card Share: " + data.post);
console.log("EVENT: Card Share: " + data.origin);
});
 
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk