WordPress.org

Ready to get started?Download WordPress

Forums

Recent Facebook Posts
[resolved] Setting image width (14 posts)

  1. enigmaverse
    Member
    Posted 1 year ago #

    I've got a every specific design in mind for use with this widget... my php skill are weak, but I can generally figure most things out.

    I'd like to set the image size to a specific height and width (this would be a great addition to your setting btw). I've changed the the image type from "picture" to "source" per the graph API, but I cant figure out how to set my height and width.. every thread I come upon says to set it in the url with JSON but your control isnt set up that way and just configuring it in the img tag distorts it.

    It appears I'm still not getting the larger source image either... any assistance you can provide would be wonderful.

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

  2. dsbrennan
    Member
    Posted 1 year ago #

    I'm interested in how to get a larger source image as well. I can set the width to 100% of the column using CSS, but that doesn't help without a larger image to start with.

  3. enigmaverse
    Member
    Posted 1 year ago #

    I've got the same issue. It looks like he is grabbing the "picture" field from the open graph post object, but for some reason its only returning thumbnail size. I started digging into a month ago, but needed to move on to keep a project on schedule...

    if we could somehow reference the photo object type it would give us the ability to scale the images. A setting on the tools page would be nice too.

  4. ykruger1
    Member
    Posted 1 year ago #

    Same issue here...

  5. gnome11
    Member
    Posted 1 year ago #

    Here is a work around:

    Add this line of code right before the image output in class-rfb.php:
    $post['image'] = str_replace("_s.jpg","_n.jpg",$post['image']);

    (at least before here:
    $output .= '<p class="rfb_image"><a target="_blank" href="'. $post['link'] . '" rel="nofollow"><img src="'. $post['image'] . '" alt="" /></a></p>'; )

    Somehow a larger picture is returned when ends as "_n.jpg"!

  6. eagerbob
    Member
    Posted 1 year ago #

    Thanks Gnome, but it did not work for me.

    I added your code right above the line you gave, but I still get the smaller "s.jpg" image. I did refresh the cache but to no avail.

  7. gnome11
    Member
    Posted 1 year ago #

    oh, eagerbob how do you add the shortcode into your site? When using the widget the resize trick didn't work, but putting the shortcode on the page/post did. So to add the larger images into a sidebar I used a text widget and got it to work.
    And curious, if you open the image link in a new window and manually change the _s to _n at the end of the image name, you get a larger photo, correct?

  8. eagerbob
    Member
    Posted 1 year ago #

    @gnome: Ah, I see, I used the widget.

    Yes, I did try to manually change the _s to _n in the image URL and indeed the bigger picture shows.

  9. Danny van Kooten
    Member
    Plugin Author

    Posted 1 year ago #

    Hey everone,

    This indeed seems like a nice setting to be included in a future version of RFB, I'll keep you guys updated.

  10. envynailspa
    Member
    Posted 1 year ago #

    @gnome11 Sorry I'm new with this but I'm not sure what you mean when you wrote When using the widget the resize trick didn't work, but putting the shortcode on the page/post did. So to add the larger images into a sidebar I used a text widget and got it to work.

    . Can you please help with a little more details ?

  11. Jakwikst
    Member
    Posted 1 year ago #

    Thanks, your solution worked very well! This is simple the best facebook plugin. Very nice work.

  12. gnome11
    Member
    Posted 1 year ago #

    @envynailspa I believe, you can either use this plugin by 1) adding the plugin widget to your site or 2) adding shortcode to a page or post. When I learned about the resize trick above, I noticed it only worked (returned the larger image) when adding the shortcode to a page or post, not while using the widget.

    So it is important to see how you are using the plugin.
    If the code was added correctly, the fix above should work fine if you added shortcode to a page, for example [recent-facebook-posts number=7 likes=0 comments=0 excerpt_length=250] .
    If you are using the Recent Facebook Posts Widget in a sidebar, the fix may not work. If it is not working for you, replace the Widget with a text widget that enter the shortcode as above, for example.

  13. Danny van Kooten
    Member
    Plugin Author

    Posted 1 year ago #

    Hi everyone,

    Please try updating to 1.2.2, I've added an option where you can specify which image size to load as well as image and height options.

    Let me know how they work for you. All suggestions are welcome. : )

    PS. Renew the cache after changing the preferred image size.

    Thanks, Danny.

  14. Jakwikst
    Member
    Posted 1 year ago #

    Hi, it works very well. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.