WordPress Facebook Instant Articles not working

I’m trying to install the wordpress plugin “Instant Articles for WP” (https://es.wordpress.org/plugins/fb-instant-articles/), I finish the process but when I get to the point to send 5 articles to review for FB the plugin show me to check all(5) the posts to solve the warnings on it, I tried to edit the post but the box that contain the Instant Articles is loading and does not solve anything, in the Chrome console I get “Uncaught ReferenceError: instant_articles_load_meta_box is not defined”. I tried to move the jquery declaration to the top but the error persists. Any ideas? ):

instant-articles-meta-box.js

function instant_articles_force_submit ( post_ID ) {
    var data = {
        'action': 'instant_articles_force_submit',
        'post_ID': post_ID,
        'force': jQuery( '#instant_articles_force_submit' ).is( ':checked' ),
        'security': jQuery( '#instant_articles_force_submit' ).attr( 'data-security' )
    };
    jQuery.post( ajaxurl, data, function(response) {
        instant_articles_load_meta_box( post_ID );
    });
}
function instant_articles_load_meta_box ( post_ID ) {
    jQuery( document ).ready( function( $ ) {
        var data = {
            'action': 'instant_articles_meta_box',
            'post_ID': post_ID
        };
        jQuery.post( ajaxurl, data, function(response) {
            jQuery( '#instant_article_meta_box .inside' ).html( response );
            jQuery( '#instant_articles_force_submit').click( function () {
                instant_articles_force_submit( post_ID );
            } );
        }, 'html' );
        jQuery( '#instant_article_meta_box' ).delegate( '.instant-articles-toggle-debug', 'click', function () {
            jQuery( '#instant_article_meta_box' ).toggleClass( 'instant-articles-show-debug' );
            return false;
        } );
    });
}

meta-box-loader-template.php

<span class="instant_articles_spinner" ></span>
<script>
    instant_articles_load_meta_box( <?php echo absint( $post->ID ); ?> );
</script>
  • WP version 4.7.3
  • PHP version 5.4.17
  • Plugin version 3.3.3

Read more here: WordPress Facebook Instant Articles not working

Leave a Reply

Your email address will not be published. Required fields are marked *