Customizing the Facebook Importer

Home Forums Calendar Products Filter Bar Customizing the Facebook Importer

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1017286
    Keith
    Participant

    Hi,

    Following my previous post, I completely understand that integrating my suggestion with the rest of the code, and adding the associated error handling and reporting is not trivial, and probably not something you’re going to embark on in the near future.

    On the other hand if I wanted to put together something quick and dirty myself, as far as I see, it would just be case of reading an extra variable from the input box and poplulating the appropriate field to write to the database. Would you see it as being much more complicated than that?

    Would you be able to point me to appropriate part in the code? The part reads and parses the input box, and the part which writes to the database?

    An even quicker (and dirtier!) way of doing it would be just to update the database directly. I see that the event origin is preserved in the meta data. I’m thinking I could put something together to update post_author for events originating at Facebook. Any problems with that, apart from the usual caveats about running SQL directly on a production database?

    One thing that is confusing me is that some post have their author set to a non-existant user (post_author=0);

    I appreciate that you don’t support customizations here, but if you could let me know if the above sounds feasible, and give me any pointers in the right direction, that would be very helpful.

    Thanks a lot.
    Keith

    #1017336
    George
    Participant

    Hey @Keith,

    I assume that you are talking about the features you would like to implement as mentioned in your other post, as follows:

    The goal is to be able to import events from Facebook using the Facebook import, and then assign them to a Community Events user. This would allow Community Events users to modify events imported from their Facebook page.

    If all of your Community Events users are authors on the site already, i.e. they have user accounts, then you can just go into the events that were imported from Facebook and change the author to whatever user is appropriate.

    If you need more features than this or something, as noted it will take custom code; I know you’re aware of this, but just wanted to reiterate, because we really cannot help with customizations!

    You ask if these customizations are feasible: they are. With all of my warnings about customization support, before closing this thread I will try to at least share some general ideas:

    1. You ask about writing right to the database…this is feasible but generally not recommended. If you’re more familiar with SQL database code and such, and so it’d be easier to do this than using a bunch of WordPress-specific functions, then you can do so using the WPDB class as written about here: https://codex.wordpress.org/Class_Reference/wpdb

    2. To associate users with events, you can use the custom fields on the event or the custom fields on the User, or some combination of these things.

    You can learn about post meta here → https://developer.wordpress.org/reference/functions/get_post_meta/

    You can learn about user meta here → https://codex.wordpress.org/Function_Reference/get_user_meta

    3. Finally, you ask about where certain things happen in the admin – i.e. the “input box” and such. There are many different files in our plugins that all lead to these features working, but if you’re curious about modifying the admin-facing views in the plugin, head into Facebook Events and/or Community Events and look for the “src/admin-views” directory – these are all, appropriately, the Admin Views of the plugin. So hopefully this helps narrow down your searching for various admin elements.

    We do not offer any support for code customizing. I’m sorry about the frustrations that might result from this, but answering specific questions about code customizations is not something we can really do either.

    Hopefully my answers here help you get started with your customizations. Your best bet is to keep good backups of your code along the way and just tinker around – if you need a customization, please do not post another thread about it on the forums here and seek professional services from a developer to help you build what you need. If you do not know of a developer for hire personally, we have some listed here that might help you get started on your search → http://m.tri.be/18k1

    I don’t mean to make things harder for your Keith – we have to adhere to our policies uniformly for all customers, and unfortunately just do not have the time or resources to help with code customization.

    Best of luck with your customizing!

    Thank you,
    George

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Customizing the Facebook Importer’ is closed to new replies.