Title: Custom functionality after shared.
Last modified: January 3, 2017

---

# Custom functionality after shared.

 *  Resolved [ashish.j](https://wordpress.org/support/users/ashishj/)
 * (@ashishj)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/custom-functionality-after-shared/)
 * 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 9 years, 4 months ago by [ashish.j](https://wordpress.org/support/users/ashishj/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Author [micropat](https://wordpress.org/support/users/micropat/)
 * (@micropat)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/custom-functionality-after-shared/#post-8614800)
 * Yes! See AddToAny Event Tracking & Handling:
    [https://www.addtoany.com/buttons/customize/wordpress/events](https://www.addtoany.com/buttons/customize/wordpress/events)
 *  Thread Starter [ashish.j](https://wordpress.org/support/users/ashishj/)
 * (@ashishj)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/custom-functionality-after-shared/#post-8616616)
 * Hello [@micropat](https://wordpress.org/support/users/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](https://wordpress.org/support/users/micropat/)
 * (@micropat)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/custom-functionality-after-shared/#post-8616879)
 * 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](https://wordpress.org/support/users/ashishj/)
 * (@ashishj)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/custom-functionality-after-shared/#post-8617066)
 * Hello [@micropat](https://wordpress.org/support/users/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](https://wordpress.org/support/users/micropat/)
 * (@micropat)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/custom-functionality-after-shared/#post-8619617)
 * 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.

 * ![](https://ps.w.org/add-to-any/assets/icon.svg?rev=972738)
 * [AddToAny Share Buttons](https://wordpress.org/plugins/add-to-any/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/add-to-any/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/add-to-any/)
 * [Active Topics](https://wordpress.org/support/plugin/add-to-any/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/add-to-any/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/add-to-any/reviews/)

## Tags

 * [hook](https://wordpress.org/support/topic-tag/hook/)
 * [shared](https://wordpress.org/support/topic-tag/shared/)

 * 5 replies
 * 2 participants
 * Last reply from: [micropat](https://wordpress.org/support/users/micropat/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/custom-functionality-after-shared/#post-8619617)
 * Status: resolved