WordPress.org

Ready to get started?Download WordPress

Forums

Shareaholic | share buttons & related posts
Facebook not Sharing when add post programmatically (frontend) (3 posts)

  1. son0fhobs
    Member
    Posted 9 months ago #

    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/
    (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/

    Thanks for your help!

    http://wordpress.org/plugins/sexybookmarks/

  2. son0fhobs
    Member
    Posted 9 months ago #

    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!

  3. Celeste - Shareaholic
    Member
    Posted 9 months ago #

    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 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) 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!

Reply

You must log in to post.

About this Plugin

About this Topic