• Hi,
    I’m testing integration with Event Manager plugin so that when I add an event to my facebook page I’d like to import immediately the events to wordpress, instead of waiting until 1 hour for scheduled import.
    I see this in settings “We’ll fetch events for you automaticly but you can reload at anytime.” but I don’t understand how.
    If I put my event page id again in form and click “import page events” button it says “###pageNumber### already exists.” but it doesn’t import events immediately.

    My workaround to try it is

    <form id="facebook_event_import_custom" method="post" >
    	        <input type="submit" value="Sincronizza ora" class="button-primary"/>
    	        <img class="loader" src="<?php echo plugins_url( 'assets/images/X-loader.gif', __FILE__ ); ?>" width="30" heigh="30">
    	</form>

    in facebook_events_importer.php and I think that the best way to refresh import by clicking a button is to add actionEvent to facebook_import.js like this

    $('#facebook_event_import_custom').submit(function (event) {
    
                    $('#facebook_event_import_custom .loader').fadeIn();
                    event.preventDefault();
                    $.ajax({
                       url: fbeAjax.ajaxurl,
                        type: 'POST',
                        data: {
    						action : 'fbe_cron_hourly_event'
    
                        },
                        success: function (data) {
    					    $('#facebook_event_import_custom .loader').fadeOut();
    						$('#event_results').html(data);
                            $('#event_results').fadeIn(300);
    
                        },
                        error: function () {
    						$('#event_results').html('error');
    
                        }
                    });
    
                    return false;
    
                });

    But I don’t know if this is correct and what function sets the importing off.

    HOW CAN IMPORT IMMEDIATELY FACEBOOK EVENTS?

    Thank you for help

    https://wordpress.org/plugins/facebook-events-importer/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author WPTrashPanda

    (@jprescher)

    The events list should be appearing like in the screenshot with the reload button. It sounds like a CSS issue possible of some sort. First I’ve heard of it. It could be related to using User ID’s that contain numeric values however. Is that the case?

    I’m having a similar issue with the “###pageNumber### already exists.” response showing after I enter the Facebook ID in the text field and click “Import Page Events” button.

    I believe there must be some php database log that has saved this ID or something because I previously had events loaded in fine, but then I deleted them because there were duplicates so I could do a fresh reload. Of course now it says that it already exists and won’t fetch the events a second time.

    Is there a way I can have it fetch events like the first time? Do I need to go into phpMyAdmin and search for file to delete so it will pull it fresh?

    Thanks!

    Oh! Never mind! It pulled in the events now. I guess I just had to wait. 😉

    FYI: I still see duplicate events in the WP backend under “Facebook Events”, but it doesn’t show on the page front-end, so I can deal with that. Just wanted to let you know.

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

The topic ‘Facebook Import by button click’ is closed to new replies.