Title: Call share Function Externally
Last modified: March 13, 2021

---

# Call share Function Externally

 *  Resolved [Sayan Datta](https://wordpress.org/support/users/infosatech/)
 * (@infosatech)
 * [5 years, 2 months ago](https://wordpress.org/support/topic/call-share-function-externally/)
 * Hello,
 * Is there any way to call the Plugin’s Sharing function from another plugin of
   theme directly?
 * GMB is not working if I use this:
 *     ```
       $post = get_post( $post_id );
       if ( class_exists( 'Rop' ) && class_exists( 'Rop_Admin' ) ) {
           $plugin = new \Rop();
           $plugin_admin = new \Rop_Admin( $plugin->get_plugin_name(), $plugin->get_version() );
           $plugin_admin->share_scheduled_future_post( $post );
       }
       ```
   
 * Thanks!

Viewing 1 replies (of 1 total)

 *  Plugin Contributor [Uriahs Victor](https://wordpress.org/support/users/uriahs-victor/)
 * (@uriahs-victor)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/call-share-function-externally/#post-14190595)
 * I’ve not tried this but it should work as long as you meet the method’s requirements,
   so turn on WP debugging and add some steps to the code to see where the process
   might be halting.
 * Also, `share_scheduled_future_post` still has to call `rop_cron_job_publish_now`
   so that might be the better method to look at if you want to share a post immediately/
   externally. Log the contents of the `$accounts_data` parameter for that method
   to see how the structure looks when you’re using the “Share post instantly using
   Revive Old Posts” checkbox from the editor screen.
 * Then try calling that method from your external theme/plugin with the appropriate
   params.
 * One last thing. GMB is a Pro feature, you need the pro plugin for it to work.
   This forum is only for the free plugin so unfortunately we can’t help any further
   with custom coding support

Viewing 1 replies (of 1 total)

The topic ‘Call share Function Externally’ is closed to new replies.

 * ![](https://ps.w.org/tweet-old-post/assets/icon-256x256.gif?rev=3127181)
 * [Revive Social – Social Media Auto Post and Scheduling Automation Plugin](https://wordpress.org/plugins/tweet-old-post/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tweet-old-post/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tweet-old-post/)
 * [Active Topics](https://wordpress.org/support/plugin/tweet-old-post/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tweet-old-post/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tweet-old-post/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Uriahs Victor](https://wordpress.org/support/users/uriahs-victor/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/call-share-function-externally/#post-14190595)
 * Status: resolved