I am trying to display the share count (FB, LI, T) and like (FB) count when a new post is submit / updated. For the early version we used the code

postAfterSubmitMethodCallbacks.push(function(post) { if (post.url) { getPostsShareCount(post.url, post._id); } return post; });

For the current version i changed it as per the documentation like

function updatePostOnSubmit (post) { if (post.url) { getPostsShareCount(post.url, post._id); } return post; } Telescope.callbacks.add("postSubmitAsync", updatePostOnSubmit);

But it is not working. Am I missing anything here? Please advice

These are some errors which i got while executing a post submit

Exception in defer callback: Error: Match error: Failed Match.OneOf or Match.Optional validation at checkSubtree (packages/check/match.js:244:1) at check (packages/check/match.js:32:1) at [object Object]..extend._getFindOptions (packages/mongo/collection.js:239:1) at [object Object]..extend.find (packages/mongo/collection.js:275:1) at getPostsShareCount (packages/telescope:social-share-count/lib/server/shares.js:3:1) at updatePostOnSubmit (packages/telescope:social-share-count/lib/server/shares.js:142:1) at packages/telescope:lib/lib/callbacks.js at Array.forEach (native) at packages/telescope:lib/lib/callbacks.js at [object Object]._.extend.withValue (packages/meteor/dynamics_nodejs.js:56:1)


No comments to display.