Can I Trigger Social Share via Post Meta?
-
Great plugin. Works great as intended while editing a post via admin.
Much of my site content is imported automatically using WP RSS Aggregator, which auto-posts content via various RSS feeds. My question is how can I force a Facebook Auto Publish when new content is auto-imported?
WP RSS Aggregator is fairly flexible in that I can create functions to filter the in-bound data. For example, apply a regex filter to a subject line or strip links from the content. I can also set meta data. I have played with (successfully) setting !xyz_fbap=1, !xyz_fbap_insert_og=1, and a few variations of values for !xyz_fbap_future_to_publish, but I can’t get it to fire.
Is it possible to set a meta value that will trigger an autopost? Is there another method I should consider?
I’ve tried firing this on insert, but it ends up triggering the autopost twice:
function my_project_update_facebook( $post_id, $post, $update ) { // If this is a revision, don't post to Facebook if ( wp_is_post_revision( $post_id ) ) return; xyz_fbap_link_publish( $post_id ); } add_action( 'wp_insert_post', 'my_project_update_facebook', 10, 3 );
- The topic ‘Can I Trigger Social Share via Post Meta?’ is closed to new replies.