Recent Facebook Posts
[resolved] only showing items that were 'shared' on the facebook wall. (7 posts)

  1. mckinselberg
    Posted 3 years ago #

    Hi Danny,

    I've been using your plugin, which is great. However, it is exhibiting a strange quirk. It is only showing items that were 'shared' on the facebook wall. Is there a setting or code edit that you are aware of that addresses this odd behavior?




  2. christianhede
    Posted 3 years ago #

    Hi Danny,

    I seem to have the same problem.


  3. uili
    Posted 3 years ago #

    for me is only showing normal posts, not shared ones!

  4. olliedc
    Posted 3 years ago #

    I have this problem too. As a quick hack, Plugins -> Editor -> (Recent Facebook Posts) -> Edit recent-facebook-posts/classes/class-rfb.php

    Find the function renew_cache_file(), and I've changed a few lines as follows:

    $apiResult = $fb->api(trim($opts['fb_id']) . '/posts?with=message&limit=250');

    if(!$apiResult or !is_array($apiResult) or !isset($apiResult['data']) or !is_array($apiResult['data'])) { return false; }

    $data = array();
    foreach($apiResult['data'] as $p) {
    if(!in_array($p['type'], array('status', 'photo', 'video', 'link'))) { continue; }

    In the first line, it used to read "feed?with=message" rather than "posts?with=message"; and in the last one I added the 'link' option so link posts are included.

    As I say, it's a bit of a hack, having played with the Facebook API Explorer, however I can't find the full API documentataion so don't know why the plugin author has used the method which has been used, nor really understand the API call syntax at all! Works (for me!) though...

  5. olliedc
    Posted 3 years ago #

    Just to add, I've looked at the plugin source now (here), and see that the code was changed between v1.1.1 and 1.1.2 to switch from 'posts' to 'feed'.

  6. mdrapkin
    Posted 3 years ago #

    Thanks, olliedc! That is a significant improvement and new posts are now being displayed.

  7. Danny van Kooten
    Plugin Author

    Posted 3 years ago #

    Hey all,

    In version 1.2 of Recent Facebook Posts I've reverted back to using the 'posts' method from Facebooks API, as in olliedc's code snippet. I've also added the link post type, so those are included as well.

    Thanks for your patience, I've been crazy busy the last few months.


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Recent Facebook Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.