Ultimate facebook not importing comments

Hi,

I recently installed VaultPress backup and security plugin in and noticed that the facebook comments are not being imported to my website. prior to this time the comments came in from facebook regularly.

Ive tried deactivating the UF plugin and reactivating it but still no joy, any idea to how this can be sorted?

Hope to hear from you soon.

Thanks

  • Mason
    • DEV MAN’s Sidekick

    Hiya @ace2ice,

    I don’t have a vaultpress install unfortunately. If you deactivate that plugin do comments again get imported? It’d be great if we could figure out which variable is causing the conflict.

    Also, check for other culprits – are extended permissions still in place? Anything in the Ultimate Facebook error logs or in your php error logs?

    Let us know. Hopefully we’ll get to the bottom fo this shortly. Thanks!

  • ace2ice
    • WPMU DEV Initiate

    Hello,

    Ive deactivated Vaultpress, Jetpack, Contact form 7 but that didnt help. Extended permissions are still in place.

    I however noticed that when sending post to facebook via the post page i have two of my page listed, thought that might be the cause so i unchecked the second id in the “Skip importing comments for these accounts” section but that didnt help either :slight_frown:

    Saw this in the error log tho “post_on_facebook exception CurlException: 28: Operation timed out after 60000 milliseconds with 0 bytes received”

    Do hope we can get this sorted sooner.

    Thanks

  • ace2ice
    • WPMU DEV Initiate

    That error happened 8 times between the 9th and 16th of October and 2ce on the 16th.

    Strangely, one comment was imported yesterday but another which was posted after it wasnt imported….getting confusing now but im sure there will be a logical explanation for it.

    Cheers

  • Mason
    • DEV MAN’s Sidekick

    Hiya,

    The error relates to the connection timing out during various phases of the HTTP process:

    Either, the connection was established, but no (or very little) data was returned or the connection couldn’t be established at all or the TCP connection was established, but was dropped somewhere in the negotiation of a secure channel.

    This bug appears to be the same issue https://developers.facebook.com/bugs/328399317246454?browse=search_4ff4817e0c5ec9768956669

    And I found this one as well:

    http://stackoverflow.com/questions/10088320/can-not-connect-to-facebook-with-a-curl-request?rq=1

    Ultimately, it just means that Facebook’s API server was a little slower than expected. You could try using a longer timeout, or, since it’s intermittent, catching the exception and trying again. If you’re not sure how to do this, I’d contact your host provider and see if they can set it up for you.

    Hope this helps. Thanks!

  • ace2ice
    • WPMU DEV Initiate

    Owkay, thanks for the breakdown but the main issue right now is importing comments from facebook and not sending stories to my facebook page which i suppose was responsible for that error.

    Please suggest to me what can be done, ive tried quite a number of things.

    Hoping to hear from you sooner.

    Regards

  • Mason
    • DEV MAN’s Sidekick

    Hiya @ace2ice,

    Apologies if I wasn’t more clear in my original response. As far as I can tell there’s nothing further we can do here – except contact your host and ask them to do two things:

    1. clear their DNS caches

    2. use a longer curl timeout via CURLOPT_CONNECTTIMEOUT

    I’m assuming you’re on a shared server environment so your host will need to make these changes for you.

    Hope this helps. Thanks!

  • ace2ice
    • WPMU DEV Initiate

    Thanks Vlasdislav,

    After doin the upgrade, it did not import the comments already posted but i realised shortly that it imports the new comments but assigns it to a wrong post. Hope you understand?

    Also where do i find the WDFB_FACEBOOK_CURLOPT_TIMEOUT define option?

    Hope to hear from you soon.

    Regards

  • Vladislav
    • Dead Eye Dev

    Hi,

    Thank you very much for the additional info, and for the chat we had the other day. With additional info, I hope I managed to hunt the issue down to mapping Jetpack-created (wp.me) shortlinks back to original local post on WordPress install. The attached update will check for these conditions and deal with the Jetpack-shortened URLs properly. Can you please try it on and see if it helps?

    As for the define, you can place it in, say, your wp-config.php, with timeout in seconds, e.g.:

    define('WDFB_FACEBOOK_CURLOPT_TIMEOUT', 15);

  • Vladislav
    • Dead Eye Dev

    Hi,

    If you have FTP access to your site, you can just update the plugin with the one I attached. To do this, first download the attachment and unpack it somewhere on your hard drive. Next, open up your FTP program and connect to your site. Next, on your site, navigate to wp-content/plugins directory in your WordPress installation folder. There will be a directory named “wpmu-dev-facebook” – just like in the attached archive. Lastly, you just upload the folder you unpacked from the attached archive in the first step over the one on your FTP server. This is just a quick walkthrough, here’s a link to a bit more verbose article that might be helpful: https://premium.wpmudev.org/manuals/wpmu-manual-2/installing-regular-plugins-on-wpmu/

  • ace2ice
    • WPMU DEV Initiate

    Thanks for the quick walkthrough, I’ve updated the files… so what now? do we wait for a new comment to be posted cause it still did not import the recent comments.

    Once again i do appreciate your help, hoping to hear from you soon.

    Regards,

  • Vladislav
    • Dead Eye Dev

    Hi,

    Have you tried to manually import them (via “Import now” button in plugin settings)? If so, have you deleted the erroneous ones from the previous comments import attempt? The plugin won’t re-import the same comments twice, so if the old ones are still around in any way, that could possibly be the cause.

  • ace2ice
    • WPMU DEV Initiate

    I checked the previous erroneous imported comments and found that they had been properly assigned!

    Waited for the next posted comment and had that imported manually so i believe ive been sorted *doing a dance* lol

    thanks so very much for your time.

    Would you advise i do further upgrades on Jetpack especially?

    Best regards

  • Vladislav
    • Dead Eye Dev

    Hi,

    @ace2ice I’m so glad we finally nailed it! Unless Jetpack changes the URL structure significantly, there shouldn’t be issues with upgrading, and I’ll be releasing the fix for Ultimate Facebook so you can just continue with the plugin upgrades regularly. Thank you for your patience and help in solving this issue!

    @ivn, the issue with Jetpack was relatively straightforward to solve (once we pinpointed the cause) because Jetpack-generated shortlinks maintained information about local posts they’re referring to. If there’s such info in your setup, a fix similar to this would be possible too. If not, are perhaps the shortlinks cached somewhere (e.g. in post meta)? Either way, the url-to-post mapping is filterable, so you could apply some custom logic to remap the URLs back to posts and enable the imports to continue normally. Would this work for your scenario?

  • Kimberly
    • Champion of Loops

    Hi!

    Just checking in :slight_smile:

    I’m guessing that because we haven’t heard back from you that you’ve got your issue worked out via live chat or email, or that we have reached the end of our convo here. If you are still having problems or need any other answers on this particular topic please feel free to come back to this thread at anytime. Just be sure to mark it Not Resolved so we don’t miss it!

    This ticket is only being Resolved due to lack of activity. It is by no means an action to avoid, brush off or minimize your issue. We are ready and here if you want to re-open at any time and I apologize in advance for any lack of communication if this ticket is being closed in error.

    Thanks for being part of the WPMU DEV Community!

    Best,

    Kimberly

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.