NOTE: These instructions are for the unmodified 1.7.2 version of the plugin.
You can modify the php to grab a larger image from Facebook by doing the following:
- Open ‘/wp-content/plugins/jsl3-facebook-wall-feed/php/class-uki-facebook-wall-feed.php’
- Line 851 is the following:
return $result;
- Add the following lines before line 851:
$search = array('_s', '_n');
$result = str_replace($search, '_b', $result);
$result = str_replace('s130x130', 'b960x960', $result);
- Save the file
NOTE: Depending on the size you want, replace '_b'
and 'b960x960'
with the following:
'_t'
and 't75x75'
– up to 75 pixels on the longest side
'_s'
and 's130x130'
– up to 130 pixels on the longest side
'_a'
and 'a180x180'
– up to 180 pixels on the longest side
'_b'
and 'b960x960'
– up to 960 pixels on the longest side
UPDATED: August 17, 2014
NOTE: These instructions are for the unmodified 1.7.2 version of the plugin.
You can modify the php to grab a larger image from Facebook by doing the following:
- Open ‘/wp-content/plugins/jsl3-facebook-wall-feed/php/class-uki-facebook-wall-feed.php’
- Line 851 is the following:
return $result;
- Add the following lines before line 851:
$search = array('_s', '_n');
$result = str_replace($search, '_b', $result);
$result = str_replace('s130x130', 'b960x960', $result);
$result = str_replace('/v/', '/', $result);
- Save the file
Depending on the size you want, replace '_b'
and 'b960x960'
with the following:
'_t'
and 't75x75'
– up to 75 pixels on the longest side
'_s'
and 's130x130'
– up to 130 pixels on the longest side
'_a'
and 'a180x180'
– up to 180 pixels on the longest side
'_b'
and 'b960x960'
– up to 960 pixels on the longest side
UPDATED: November 20, 2014
NOTE: These instructions are for the unmodified 1.7.2 version of the plugin.
You can modify the php to grab a larger image from Facebook by doing the following:
- Open ‘/wp-content/plugins/jsl3-facebook-wall-feed/php/class-uki-facebook-wall-feed.php’
- Line 308 is the following:
$fb_url .= "&fields=from.fields(id,name),privacy,message,name,caption,description,id,created_time,picture,source,link,likes.limit(1).summary(true),properties,icon,story,comments";
- Replace it with the following:
$fb_url .= "&fields=from.fields(id,name),privacy,message,name,caption,description,id,created_time,picture,source,link,likes.limit(1).summary(true),properties,icon,story,comments,object_id";
- Lines 535 to 537 are the following:
if ( isset( $fb_feed[ $i ][ 'picture' ] ) )
$fb_picture =
$this->fb_fix( $fb_feed[ $i ][ 'picture' ] );
- Replace them with the following:
if ( isset( $fb_feed[ $i ][ 'object_id' ] ) )
$fb_picture =
$this->fb_fix( 'https://graph.facebook.com/' . $fb_feed[ $i ][ 'object_id' ] . '/picture?type=normal' );
elseif ( isset( $fb_feed[ $i ][ 'picture' ] ) )
$fb_picture =
$this->fb_fix( $fb_feed[ $i ][ 'picture' ] );
- Save the file
It looks like Facebook does not allow you to get larger images via data provided in the feed anymore. The only way I can see to get the larger image is to make a separate request for each post that contains an attachment. Does anyone know of a way to get the larger image with data provided in the feed?