Facebook Import by button click
-
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
The topic ‘Facebook Import by button click’ is closed to new replies.