Facbook Activity feed is not loading

No JS errors, no PHP warnings, no nothing. The Facbook Activity feed widget does not load on our front page (http://dev.lynks.se, in the middle) but it does load on sub pages http://dev.lynks.se/om-oss/ (lower right side).

Do you have any idea what could be wrong?

  • DavidM
    • DEV MAN’s Mascot

    Hi KFUK-KFUM,

    Hmm, seems like a potentially tough one to troubleshoot, but just to check on one thing at least, are the settings exactly the same between both the widgets?

    I guess probably importantly is the domain names or filter terms, if any, you’ve specified? Any chance you could provide a screenshot of the two settings so we could test those specifically?

    Thanks,

    David

  • Niklas
    • The Incredible Code Injector

    Solution found! Finally!

    Changed class_wdfb_widget_activityfeed.php to:

    function widget($args, $instance) {
    extract($args);
    $title = apply_filters('widget_title', $instance['title']);
    $width = (int)$instance['width'];
    $width = $width ? $width : 300;
    $height = (int)$instance['height'];
    $height = $height ? $height : 300;
    $url = $instance['url'];
    $url = $url ? $url : parse_url(site_url(), PHP_URL_HOST);
    $show_header = (int)@$instance['show_header'];
    $show_header = $show_header ? 'true' : 'false';
    $recommendations = (int)@$instance['recommendations'];
    $recommendations = $recommendations ? 'true' : 'false';
    $filter = @$instance['filter'];
    $color_scheme = $instance['color_scheme'];
    $color_scheme = $color_scheme ? $color_scheme : 'light';
    $links = $instance['links'];
    $links = $links ? $links : '_blank';
    $api = get_option('wdfb_api');
    echo $before_widget;

    if ($title) echo $before_title . $title . $after_title;

    echo '<iframe id="" name="" scrolling="no" style="border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; border-width: initial; border-color: initial; border-image: initial; overflow-x: hidden; overflow-y: hidden; height: ' . $height . 'px; width: ' . $width . 'px; " class="fb_ltr" src="https://www.facebook.com/plugins/activity.php?api_key=' . $api['app_key'] . '&header=' . $show_header . '&height=' . $height . '&linktarget=' . $links . '&locale=' . get_locale() . '&recommendations=' . $recommendations . '&site=' . $url . '&width=' . $width . '"></iframe>';

    echo $after_widget;
    }

    Notice the use of get_locale() to localize the facebook iframe. I also modified class_wdfb_widget_likebox.php to add get_locale() there as well and now the like box also uses the same language as we serve the WP site with!

    My above markup should also probably not have an empty id because that is invalid markup, but I rushed here as soon as I found a working solution. :slight_smile:

  • Vladislav
    • Dead Eye Dev

    Hi,

    Once again, thank you so much for your continual constructive feedback and contribution! In the latest plugin release (v1.6.1, just released) we took a similar approach. In some circumstances, using simply get_locale() won’t sit well with Facebook, so we’re using an utility function (wdfb_get_locale) which also takes into account the locale settings for users chosen language in plugin settings.

  • Timothy
    • Chief Pigeon

    Hey there! :slight_smile:

    Just checking in to see how things are going with this one and if you need any further help. :slight_smile:

    Since the developers last reply, version 2.0 was released. Hows that one working for you?

    We haven’t heard from you on this thread for a while, perhaps you got help over email. I’m going to presume your all fixed up now and don’t need any further assistance.

    However if you have more questions or need some more help then please feel free to respond in this thread or create a new one and we will be more than happy to offer assistance. :slight_smile:

    Take care.

  • Timothy
    • Chief Pigeon

    Odd, it works well on my sandbox install.

    I wonder if there was a plugin or theme conflict somewhere causing the issue, does it work with all other plugins disabled and using the default Twenty Eleven theme on your sandbox install you use before making production changes? Or if you don’t have a sandbox, then on your main install?

    I’ll ping the developer to see if he has other ideas as well.

    Take care.

  • Niklas
    • The Incredible Code Injector

    Tried 2.0 and Facebook returns “Invalid action type” in a red error box.

    Edit: Checking the box Do not use xfbml tag: [ ] If you’re experiencing issues with your Activity Feeds, try checking this option does nothing.

  • aecnu
    • WP Unicorn

    Greetings KFUM,

    Thank you for that information and being a WPMU Dev member.

    This explains why we have so many tickets concerning this exact issue.

    I hope that Facebook gets this resolved asap.

    If we can be of further assistance please let us know.

    Cheers, Joe :slight_smile:

  • aecnu
    • WP Unicorn

    Greetings KFUM,

    Thank you for being a WPMU Dev member!

    We are still currently testing this out in our development environment, and I’m going to discuss it with the lead developer and get him back in here – to get a fix sorted for you asap.

    Thanks again for bringing this up, and of course for being a member, we’ll get back to you asap.

    Cheers, Joe :slight_smile:

  • aecnu
    • WP Unicorn

    Greetings KFUM,

    Just checking if this issue was eventually resolved in another thread? Or by yourself separately to us? Or by us over email with you? Or using our live support?

    If so, no need to reply, that’s great news.

    If not, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the ‘Mark as Not Resolved (re-open)’ box below the post area (or else we’ll miss it!)

    Otherwise, happy days, glad you got it sorted :slight_smile:

    Thank you for being a WPMU Dev member!

    Cheers, Joe :slight_smile:

  • Vladislav
    • Dead Eye Dev

    Hello,

    I am really sorry for such a prolonged response time. I have tried replicating the issue a couple of times, but it seemed to work fine for me, in both versions. The odd thing is, checking the “Do not use xfbml tag” should have fixed the issue in a pretty similar way to your code – but, then again, you didn’t have any success with that option either. An update for Ultimate Facebook is in the works, and the new release will hopefully resolve this issue once for all. Thank you very much for your patience.

  • Vladislav
    • Dead Eye Dev

    Hello,

    We’ve made quite a few changes to the plugin this far and the new release should be out really soon. However, given that I failed reproducing the issue you experienced previously, I’d like to verify that the latest changes in the widget actually solve the issue for you. I’m attaching the updated widget – if the default still doesn’t work for you, can you please try switching to iframe version by checking the “Do not use xfbml tag” checkbox?

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.