Forums

Recent Facebook Posts
only showing items that were 'shared' on the facebook wall. (5 posts)

  1. mckinselberg
    Member
    Posted 2 months 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 2 months ago #

    Hi Danny,

    I seem to have the same problem.

    Christian

  3. uili
    Member
    Posted 2 months ago #

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

  4. olliedc
    Member
    Posted 2 months 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 2 months 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'.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.