• Resolved ashish.j

    (@ashishj)


    Hello There,

    Its great plugin. I am using this on my website but I want to perform an custom functionality
    after shared something by this plugin. Is there any hook ? or callback function which I can
    use?

    Thanks in advance.

    • This topic was modified 8 years, 2 months ago by ashish.j.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author micropat

    (@micropat)

    Yes! See AddToAny Event Tracking & Handling:
    https://www.addtoany.com/buttons/customize/wordpress/events

    Thread Starter ashish.j

    (@ashishj)

    Hello @micropat ,

    Thank for your response,

    I have checked this and bellow is my code which I am using but it works before share something.
    I want to perform action(run ajax) after content successfully shared.

    a2a_config.callbacks.push({
        share: function(data) {
    var m=data.service;
    console.log(m);
    $.ajax({
    	      type : "post",
    	      url  : ajaxurl,
    	      dataType: 'html',
    	      data : { action:"successfully_shared",medium:m},
    	      success: function(response) {
    		console.log("done");          
    	      }                             
           }); 
        }
    });

    Please check and help.

    Thank you!!

    Plugin Author micropat

    (@micropat)

    Services rarely ever support a post-share callback unfortunately. The AddToAny callback during the share is the closest method that covers all services.

    Thread Starter ashish.j

    (@ashishj)

    Hello @micropat,

    Thanks for your response!!

    Sorry but I am not getting your point. Can you please explain it little bit more? Is there any way we can do it ?

    Thanks

    Plugin Author micropat

    (@micropat)

    Services such as Twitter, Pinterest, Google+, Tumblr, WhatsApp, etc. do not offer callbacks for a “successful” share on those networks. There’s no way to do what you’re looking for unfortunately.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Custom functionality after shared.’ is closed to new replies.