Support » Plugin: WP RSS Multi Importer » Feeds not updating and other Problems – Read This

Viewing 15 replies - 1 through 15 (of 22 total)
  • Allen,

    I followed all your tips in this previous topic to fix the autopost import size of Facebook images: http://wordpress.org/support/topic/how-to-get-big-sized-image-from-facebook-feed?replies=22

    I replaced the “wp-rss-multi-importer/inc/import_posts.php” file, however I am getting the following errors:

    Any advise? I can give you admin access if you email me off topic.

    Plugin Author Allen

    (@amweiss98)

    when you say you replaced the import_posts.php file, what file did you replace it with? That is likely causing this error.

    I replaced the content of that file with the content you provided here: https://dl.dropboxusercontent.com/u/3132388/pluginfiles/import_posts.php

    Plugin Author Allen

    (@amweiss98)

    I have idea when that was uploaded so only use the current version of the plugin

    I am using Version 3.13 but the pictures are still importing with the smallest thumbnails.

    In this version of the plugin, the import_posts.php file still has the old code, as noted below. Did you update a different section of the code for the facebook image size?

    if ($setFeaturedImage==1 || $setFeaturedImage==2){
    		global $featuredImage;
    			if (isset($featuredImage)){
    
    				$featuredImage=rssmi_facebook_autopost($featuredImage);
    
    				$featuredImageTitle=trim($items["mytitle"]);
    				setFeaturedImage($post_id,$featuredImage,$featuredImageTitle);
    				unset($featuredImage);
    				}
    			}
    
    	}else{
    Plugin Author Allen

    (@amweiss98)

    this is not the old code..this is essentially what has been in the plugin since 2.50 or earlier…the only difference is the rssmi_facebook_autopost function that attempts to determine the size of a facebook image (if it comes from a facebook feed)

    Okay, thanks. I see the change to the rssmi_facebook_autopost function in the wp-rss-multi-importer/inc/excerpt_functions.php file. However, the imports are still not bringing in anything larger than 130 or 158 px wide. Can you email me offline so that I can give you access to my site to see what may be going on?

    Allen, amazing work, compliment for this! I’m playing around for a couple of hours in order to import a rss feed from Facebook and I’m facing exactly the same problem: The pictures are indeed imported but they are all somehow too small, thumbnail size.

    I’m using the latest version of your plugin, but noticed in previous post you “handcrafted” two php data to solve the problem (I do believe for a previous version of the plug in, it was excerpt_functions.php and import_post.php). If I replace both data through your old handcrafted one in the actual plug-in, the fetching doesn’t work at all.

    So could you please be so nice to make the solution for the problem of effieBZ public here so I could also profit from?

    Sooo, I’m a step further on this one, without having a solution….

    What I found out and could help is the following:

    I have in my Facebook rss feed as img of a picture:
    ‘https://scontent-b-iad.xx.fbcdn.net/hphotos-xpa1/v/t1.0-9/s130x130/10645068_973158296034583_2957426152380120829_n.jpg?oh=203eb3dc396db7c8dfa6ad491f82e233&oe=548270D4’

    The same small picture can be found under:
    ‘https://scontent-b-iad.xx.fbcdn.net/hphotos-xpa1/s130x130/10645068_973158296034583_2957426152380120829_n.jpg’

    and finally the original picture we are interested in is under:
    ‘https://scontent-b-iad.xx.fbcdn.net/hphotos-xpa1/10645068_973158296034583_2957426152380120829_n.jpg’

    Could you please be so nice, dear Allen, to pimp up the Facebook check in the picture handling, so that based on the first URL the third one and original picture could be put in the post and featured picture of the post?

    Plugin Author Allen

    (@amweiss98)

    here is the fundamental problem…facebook does not have a consistent pattern in order to write any code to find the largest photo. At some point, in the future I (or someone else who knows how to figure out all the patterns), will write the code to do this.

    Allen,

    In searching through multiple variations of image URL’s the one constant seems to be that after the initial mixed domain there is some variation of “…/hphotos-**-****/….” as in these examples below:

    `https://fbcdn-sphotos-f-a.akamaihd.net/hphotos-ak-xpf1/v/t1.0-9/10606378_843361135682555_7246526641709317834_n.jpg?oh=cfca9640cd3a36c6eaa5d7ec8f648bde&oe=5494A7F7&__gda__=1422598813_a7372e5a4c419d5c388b75d420f0cc33′

    Some “hphotos…” are then followed by “v/t1.0-9/..IMAGE#” or “s130x130/…IMAGE#” or only the image number.

    Is there anyway to use a PhP strpos function to detect the “v/t1.0-9/” or “s130x130/” and eliminate that part of the image URL coming in through the feed?

    Grabbing for straws here.

    I confirm, this would do the trick for Facebook . Playing with 10 different rss feed, I’m seeing that it’s always the same, the pictures included are always 130×130. Stripping off “v/t1.0-9/s130x130/” from the original address without touching the rest would work like a charm to get the original picture.

    I have it working like a charm now, changing excerpt_functions to strip off a little bit more out of the URL. Since I can’t post files, here what I did if somebody is interested.

    In excerpt_functions.php (in the directory inc), I changed
    ‘function rssmi_facebook_fix($mediaImage){ ///this fixes the ever present facebook image problem
    preg_match(‘@src=”([^”]+)”@’, $mediaImage, $match);
    if (strpos($match[1],”fbcdn”)>0){
    $fb_img=$match[1];
    $fb_img = str_replace(‘/s130x130’, ”, $fb_img);
    $fb_img = str_replace(‘_s.jpg’, ‘_n.jpg’, $fb_img);

    if (rssmi_remoteFileExists($fb_img)){
    $mediaImage = str_replace($match[1], $fb_img, $mediaImage);
    }
    }

    return $mediaImage;

    }

    function rssmi_facebook_autopost($mediaImage){ ///this fixes the ever present facebook image problem

    if (strpos($mediaImage,”fbcdn”)>0){

    $fb_img = str_replace(‘/s130x130’, ”, $mediaImage);
    $fb_img = str_replace(‘_s.jpg’, ‘_n.jpg’, $fb_img);

    if (rssmi_remoteFileExists($fb_img)){
    $mediaImage = $fb_img;
    }
    }

    return $mediaImage;

    }’

    into

    ‘ function rssmi_facebook_fix($mediaImage){ ///this fixes the ever present facebook image problem
    preg_match(‘@src=”([^”]+)”@’, $mediaImage, $match);
    if (strpos($match[1],”fbcdn”)>0){
    $fb_img=$match[1];
    $fb_img = str_replace(‘v/t1.0-9/s130x130/’, ”, $fb_img);
    $fb_img = str_replace(‘_n.jpg’, ‘_o.jpg’, $fb_img);

    if (rssmi_remoteFileExists($fb_img)){
    $mediaImage = str_replace($match[1], $fb_img, $mediaImage);
    }
    }

    return $mediaImage;

    }

    function rssmi_facebook_autopost($mediaImage){ ///this fixes the ever present facebook image problem

    if (strpos($mediaImage,”fbcdn”)>0){

    $fb_img = str_replace(‘v/t1.0-9/s130x130/’, ”, $mediaImage);
    $fb_img = str_replace(‘_n.jpg’, ‘_o.jpg’, $fb_img);

    if (rssmi_remoteFileExists($fb_img)){
    $mediaImage = $fb_img;
    }
    }

    return $mediaImage;

    }’

    and voilĂ , I get all the pictures from the feed in the original size.

    Flyer29! This fix is working beautifully!!! Now to address feeds that use external images. Ugh!

    https://fbexternal-a.akamaihd.net/safe_image.php?d=AQDNpMWs-Z2Yzl3P&w=484&h=253&url=https%3A%2F%2Fpbs.twimg.com%2Fprofile_banners%2F2812955096%2F1410875334%2F1500x500&cfs=1&sx=543&sy=0&sw=957&sh=500
    
    https://fbexternal-a.akamaihd.net/safe_image.php?d=AQAxp5octRDLkaP2&url=https%3A%2F%2Ffbcdn-vthumb-a.akamaihd.net%2Fhvthumb-ak-xpf1%2Fv%2Ft15.0-10%2Fp206x206%2F10549304_10152676329976796_10152676329276796_14680_2243_b.jpg%3Foh%3D08b6d23bc6422bbd8e5760bf7fdad87f%26oe%3D54918D60%26__gda__%3D1418551250_b9f01d96bc7103b96fa842cdb3e848b0&jq=100
    Plugin Author Allen

    (@amweiss98)

    @flyer29 Glad that worked for you…be interesting to see if this generalizes to other people…I’ll contact some others who contacted me directly about this and see if it fixes their problem.

    @effiebz good luck with this since unless you can find a clear pattern with akamaihd, it will be hard to fix.

Viewing 15 replies - 1 through 15 (of 22 total)
  • The topic ‘Feeds not updating and other Problems – Read This’ is closed to new replies.