WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. mckinselberg
    Member
    Posted 1 year 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?

    Thanks!

    -dan

    http://wordpress.org/extend/plugins/recent-facebook-posts/

  2. christianhede
    Member
    Posted 1 year ago #

    Hi Danny,

    I seem to have the same problem.

    Christian

  3. uili
    Member
    Posted 1 year ago #

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

  4. olliedc
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

  7. Danny van Kooten
    Member
    Plugin Author

    Posted 1 year 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.

    Danny

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.