Title: Facebook not Sharing when add post programmatically (frontend)
Last modified: August 21, 2016

---

# Facebook not Sharing when add post programmatically (frontend)

 *  [son0fhobs](https://wordpress.org/support/users/son0fhobs/)
 * (@son0fhobs)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/facebook-not-sharing-when-add-post-programmatically-frontend/)
 * Greetings!
    First, thanks for all the work on your plugin! Super helpful and 
   well made!
 * I built a custom user contribution page that adds a post from the front end. 
   Only on posts contributed from the front end, when shared via facebook, gave 
   me for the excerpt: “You may use these HTML tags and attributes: <​a href=”” 
   title=””> …”.
    On any other post, it shares and excerpt of the content as normal.
 * I figured that shareaholic grabs the information from the database, so I looked
   for differences in the database from a contributed post (that wasn’t sharing 
   on facebook properly) and a normal post (that was sharing fine). The contributed
   post and a regular one both looked almost identical in the database.
 * The only possible thing I can think of is that the contributed post goes to a“
   pending” status first, then publish, where as every other post goes straight 
   from draft to publish. Could that possibly be it?
 * Here’s an example of a contributed post: [http://www.nathanligo.com/5th-annual-japanese-karate-kyokushin-kan-karate-tournament/](http://www.nathanligo.com/5th-annual-japanese-karate-kyokushin-kan-karate-tournament/)
   (
   hit the facebook share button, and it’ll quickly be evident.)
 * Here’s an example of a normal post (again hit the facebook share at the bottom
   to see how it normally works): [http://www.nathanligo.com/images-from-shihan-marty-petrovichs-june-2013-belt-test-in-maine-usa/](http://www.nathanligo.com/images-from-shihan-marty-petrovichs-june-2013-belt-test-in-maine-usa/)
 * Thanks for your help!
 * [http://wordpress.org/plugins/sexybookmarks/](http://wordpress.org/plugins/sexybookmarks/)

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

 *  Thread Starter [son0fhobs](https://wordpress.org/support/users/son0fhobs/)
 * (@son0fhobs)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/facebook-not-sharing-when-add-post-programmatically-frontend/#post-3952735)
 * I think that was it. When I went straight from Draft to published, it worked 
   fine, but from pending to publish is where the error occurred.
 * Are you using the hook “draft_to_published” somewhere in the code? If yes, that
   would explain the issue. I think there’s a hook that’s more universal like publish_post,
   but if not, you could always use
 * add_action(‘pending_to_publish’, ‘your_function’);
    add_action(‘draft_to_publish’,‘
   your_function’); add_action(‘new_to_publish’, ‘your_function’);
 * But then again, the issue might be something different entirely.
 * Thanks though!
 *  [Celeste – Shareaholic](https://wordpress.org/support/users/creign/)
 * (@creign)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/facebook-not-sharing-when-add-post-programmatically-frontend/#post-3952891)
 * Hi! First, it looks like you are running an older version of our plugin. I’d 
   love to have you update and preferably to [our version 7 release](http://wordpress.org/plugins/shareaholic/)
   as this is in active development.
 * The first link you provided takes me to a 404 Error Page. Have you run the URL
   through the [Facebook Debugger Tool (Data Scraper)](https://developers.facebook.com/tools/debug)
   to see what Facebook has on file for these user contributed pages?
 * When you run a URL through this tool, you are prompting Facebook to scan the 
   page again and refresh their data. If all looks good on the results page, head
   back to the user contributed post (the URL you just had Facebook scan), reload
   the page and try sharing to Facebook again. Let me know if this corrects the 
   problem. Thanks!

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

The topic ‘Facebook not Sharing when add post programmatically (frontend)’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sexybookmarks_5e4742.svg)
 * [SexyBookmarks | Upgrade to the Official Shareaholic Plugin today!](https://wordpress.org/plugins/sexybookmarks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sexybookmarks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sexybookmarks/)
 * [Active Topics](https://wordpress.org/support/plugin/sexybookmarks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sexybookmarks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sexybookmarks/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Celeste – Shareaholic](https://wordpress.org/support/users/creign/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/facebook-not-sharing-when-add-post-programmatically-frontend/#post-3952891)
 * Status: not resolved