Title: Using a custom function, your plugin creates &#8220;auto draft&#8221; posts on FB
Last modified: January 12, 2025

---

# Using a custom function, your plugin creates “auto draft” posts on FB

 *  [Douglas “BearlyDoug” Hazard](https://wordpress.org/support/users/bearlydoug/)
 * (@bearlydoug)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/using-a-custom-function-your-plugin-creates-auto-draft-posts-on-fb/)
 * I’ve written a custom function that takes a YouTube ID and via the YT API, pulls
   the title, main image, publish date and URL to that video, and creates a WordPress
   post. The problem is that it creates the Facebook post on our page, but only 
   as a post to the page with the text of “Auto Draft” and a malformed link.
 * I should note that it creates the BlueSky post without issue. I’m using almost
   identical coding pulling stories via RSS feeds from another site (with permission)
   and those post just fine to both Facebook and BlueSky.
 * Is there a manual trigger I can call up to create the Facebook page post AFTER
   the content is situated? Because the custom post type functionality isn’t working
   properly (I start this as a custom post type, but it gets converted to a standard
   WordPress post, hooked into a category when it’s done).

Viewing 1 replies (of 1 total)

 *  [aiswaryaxyzscripts](https://wordpress.org/support/users/aiswaryaxyzscripts/)
 * (@aiswaryaxyzscripts)
 * [1 year, 4 months ago](https://wordpress.org/support/topic/using-a-custom-function-your-plugin-creates-auto-draft-posts-on-fb/#post-18240116)
 * Hi,
   Try creating the post as a draft first, then publishing it. Alternatively,
   the SMAP Premium Plus plugin offers a feature that allows you to ‘publish Upload
   to facebook when post is published and schedule publishing in facebook for a 
   later time’.

Viewing 1 replies (of 1 total)

The topic ‘Using a custom function, your plugin creates “auto draft” posts on FB’
is closed to new replies.

 * ![](https://ps.w.org/facebook-auto-publish/assets/icon-128x128.png?rev=2124304)
 * [WP2Social Auto Publish](https://wordpress.org/plugins/facebook-auto-publish/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/facebook-auto-publish/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/facebook-auto-publish/)
 * [Active Topics](https://wordpress.org/support/plugin/facebook-auto-publish/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/facebook-auto-publish/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/facebook-auto-publish/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [aiswaryaxyzscripts](https://wordpress.org/support/users/aiswaryaxyzscripts/)
 * Last activity: [1 year, 4 months ago](https://wordpress.org/support/topic/using-a-custom-function-your-plugin-creates-auto-draft-posts-on-fb/#post-18240116)
 * Status: not resolved