• MimmiN

    (@mimmin)


    I’m sorry if this is replied earlier, but I haven’t found it. I’m grateful for the Recent Facebook Posts plugin, it’s great! I’m just wondering how the image from a link is grabbed and how I may change it.

    The grabbed image is now 154 px wide, but the link image when viewed on Facebook is 377px wide. Is it possible to change the code so that I may grab the biggest version of the image?

    This is the code I guess is relevant, (but I don’t know how to change):
    class-public.php

    elseif ( $p->type == 'link' ) {
    				$post['link_image'] = ( isset( $p->picture ) ) ? $p->picture : '';
    				$post['link_name'] = ( isset( $p->name ) ) ? $p->name : '';
    				$post['link_caption'] = ( isset( $p->caption ) ) ? $p->caption : '';
    				$post['link_description'] = ( isset( $p->description ) ) ? $p->description : '';
    				$post['link_url'] = $p->link;

    class-api.php

    public function get_posts()
    	{
    		$result = $this->call("{$this->fb_id}/posts", array(
    			'fields' => 'id,picture,type,from,message,status_type,object_id,picture,name,caption,description,link,created_time,comments.limit(1).summary(true),likes.limit(1).summary(true)',
    			'access_token' => "{$this->app_id}|{$this->app_secret}"
    		));

    RFBP_API.php

    public function get_posts()
    	{
    		$result = $this->call("{$this->fb_id}/posts", array(
    			'fields' => 'id,picture,type,from,message,status_type,object_id,link,created_time,comments.limit(1).summary(true),likes.limit(1).summary(true)',
    			'access_token' => "{$this->app_id}|{$this->app_secret}"
    		));

    RFBP.php

    elseif($p->type == 'link' && !stristr($post['content'], $p->link)) {
    				$post['content'] .= (empty($post['content'])) ? $p->link : "\n\n" . $p->link;
    			}

    https://www.ads-software.com/plugins/recent-facebook-posts/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi there,

    You can change the image size in the plugin settings. Select “normal” as the image size and the plugin will pick the largest image possible.

    By default, the image will be responsive, meaning it will never exceed the width of its container. If you want to bypass this, set a large image width (in pixels) as well.

    Hope that helps!

    Thread Starter MimmiN

    (@mimmin)

    Thank you for your quick reply, but that seem to have effect on only images put on Facebook, not images from a linked page on Facebook. To me it seems like the linked image grabbed in the plugin is a smaller version than the image shown on Facebook.

    Thread Starter MimmiN

    (@mimmin)

    I think this is the same as I’m talking about
    https://stackoverflow.com/questions/15023419/get-bigger-picture-from-facebook-links-in-feed

    I’ll give you an example.
    The image on Facebook wall (grabbed by Facebook from linked page)
    https://fbexternal-a.akamaihd.net/safe_image.php?d=AQDBYFFDQRrx_XTc&w=398&h=208&url=http%3A%2F%2Ffarm8.staticflickr.com%2F7347%2F9151227382_53796bab69_z.jpg&cfs=1&sx=8&sy=0&sw=624&sh=326

    The image on my WordPresspage, seems to be only a thumbnail:
    https://external.ak.fbcdn.net/safe_image.php?d=AQCF5Ld2uxUmK6LX&w=154&h=154&url=http%3A%2F%2Ffarm8.staticflickr.com%2F7347%2F9151227382_53796bab69_z.jpg

    Is it possible to get the first image on my page?

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi there,

    I think you can change this using plain CSS but I’d have to take a close look at it. I will try to take a look somewhere this weekend but can’t promise anything, crazy busy at the moment. Sorry.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Image from link’ is closed to new replies.