Viewing 15 replies - 16 through 30 (of 39 total)
  • The football image is the correct featured image. The gravatar image is what I have set as the default if no image is found.

    I don’t have any plugins that use the gravatar and I don’t even have gravatars set to display in my comments. However, a quick scan of my function.php reminded me that I setup a function that grabs the first image from a post and displays it as the featured image if no image is found. If no images are present, it defaults to the gravatar.

    // Get image from posts with no featured image
    function catch_that_image() {
      global $post, $posts;
      $first_img = '';
      ob_start();
      ob_end_clean();
      $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
      $first_img = $matches [1] [0];
    
      if(empty($first_img)){ //Defines a default image
        $first_img = get_template_directory_uri() . '/images/gravatar.jpg';
      }
      return $first_img;
    }

    Any suggestions on making this pick up the featured image and not the gravatar image?

    Plugin Author Steve

    (@steveatty)

    Well wordbooker found the second image – I think : its hard to tell because you’ve got something that strips comments out.

    I’ve not got time to go round fixing third party code – wordbooker has enough problems in itself.

    If you turn off the other set of OG tags and post a set of diagnostic logs from a successful post then I can try to work out why wordbooker is not finding the image in the post – what ever that reason is its obvious that your image grabbing code is doing the same thing.

    Plugin Author Steve

    (@steveatty)

    And the reason I need to see a post trace is that is when Wordbooker sets its fields.

    You can turn off OG tag production in Wordbooker and let the other plug in do it.

    Ok – just ran a quick test on the same post as above that has a featured image set but sends the default image to Facebook: https://www.girlscantwhat.com/sports-athletes-teams/

    I put it in draft mode, then checked the wordbooker box to publish it to FB and then clicked publish. Here are the diagnostics (I removed my thumbnail code from functions.php – the code listed above)

    Sports Gifts for Girls	2012-02-24 09:33:35	This looks like a new post being published	publish	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Calling Wordbooker publishing function		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Commence Publish		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Author of this post is the Post Author		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Options Set - call transition		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_noncename	6379be168d	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_publish_default	on	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_primary_target	PW:662882293	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_primary_type	1	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_primary_active	on	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_secondary_target	FW:10846585097	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_secondary_type	1	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_extract_length	256	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_actionlink	200	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_thumb_only	on	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_use_excerpt	on	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_attribute	Posted a new post on their blog	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_status_update_text	: New blog post : %title% - %link%	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_like_button_page	1	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_share_button_page	1	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_comment_put	on	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_comment_get	on	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_publish_page_default	100	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_publish_post_default	200	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_post_edited	yes	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post option : wordbooker_new_post	1	-
    Sports Gifts for Girls	2012-02-24 09:33:35	User has been set to :	1	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Posting as user :	1	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Calling wordbooker_fbclient_publishaction		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Getting the thumnail image		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Getting image from custom meta :	image	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Getting image from custom meta :	thumb	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Getting image from custom meta :	Thumbnail	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Setting image array to be just thumb from meta.		-
    Sports Gifts for Girls	2012-02-24 09:33:35	No Post images found so using open graph default to keep Facebook happy		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post Images : https://www.girlscantwhat.com/gravatar.jpg		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post Images : https://www.girlscantwhat.com/wp-content/plugins/wordbooker/includes/wordbooker_blank.jpg		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Getting the Excerpt		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post Titled :	Sports Gifts for Girls	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Post URL :	https://www.girlscantwhat.com/sports-athletes-teams/	-
    Sports Gifts for Girls	2012-02-24 09:33:35	Share Link being used		-
    Sports Gifts for Girls	2012-02-24 09:33:35	Posting to Personal Wall (Primary) as a Wall Post		-
    Sports Gifts for Girls	2012-02-24 09:33:37	Wall Post to Personal Wall Succeeded - result :	662882293_10150536782257294	-
    Sports Gifts for Girls	2012-02-24 09:33:37	Posting to Secondary target (Girls Can't WHAT?) not active		-

    And in case this helps, here is the featured image code I use in functions.php

    // Featured Images
    add_theme_support( 'post-thumbnails' );
    set_post_thumbnail_size( 210, 210, true ); // Normal post thumbnails
    add_image_size( 'product-thumbnail', 150, 150, true ); // Sidebar thumbnail size
    add_image_size( 'blog-thumbnail', 100, 100, true ); // Sidebar thumbnail size
    add_image_size( 'sidebar-thumbnail', 90, 90, true ); // Sidebar thumbnail size

    And FYI – that page posted to my Facebook wall with the default image, not the featured image.

    Plugin Author Steve

    (@steveatty)

    I think its because add_theme_support(‘post-thumbnails’); doesn’t populate the featured image field in that you have to display it doing this:

    if ( has_post_thumbnail() ) {
      the_post_thumbnail();
    }

    which is not something Wordbooker currently handles because Wordbooker pulls the contents of the post so template/theme related function calls won’t be included in the regular post output.

    Ok I follow that. So why isn’t it picking up either the featured image I set or any of the images in the post?

    It seems to work on some pages and not on the others.

    Plugin Author Steve

    (@steveatty)

    I’ve no idea, and I’m having an evening off from Wordbooker… after the past two weeks of being screwed round first by WordPress and then by FB I need a break.

    No problem. I’ll keep fishing around and let you know if I find something.

    Any more word on this issue?
    For the life of me I cannot get any of the images I want to show in the Send or Share buttons.
    Site is:
    https://www.thegrandvictory.com/

    I have deactivated ALL other Facebook or Open Graph related plugins and at this point I’m simply trying to get the Default Open Graph image to be used and am having no luck.

    I’ve tried clearing Facebook’s cache of the site using the debug too here:
    https://developers.facebook.com/tools/debug/
    and entering
    https://www.thegrandvictory.com/?fbrefresh=true
    … to no avail.

    The word booker blank image still shows up.

    I see meta og:image tags in the header, but they’re not being used.
    Is there something being passed to FB by your button code?
    Please, help!

    Plugin Author Steve

    (@steveatty)

    Kais – a diagnostic trace might help. There are several reasons why images in your posts aren’t being picked up by Wordbooker but without a diagnostic trace its not possible to work out why.

    How do I get you that? I don’t use your Facebook publishing… just the Like, Send and Share buttons?
    Here’s what shows up in the Diagnostic Messages section with Show Everything on:

    Post Time Action Message Error Code
    Cache Refresh 2012-03-06 10:19:46 Cache Refresh Commence 1 –
    Cache Refresh 2012-03-06 10:19:46 Cache Refresh for –
    Cache Refresh 2012-03-06 10:19:46 UID length : 15 –
    Cache Refresh 2012-03-06 10:19:46 Cache processing for user : (100003219529656) –
    Cache Refresh 2012-03-06 10:19:46 Getting Permisions for : 100003219529656 –
    Cache Refresh 2012-03-06 10:19:46 User has permssion : publish_stream –
    Cache Refresh 2012-03-06 10:19:46 User has permssion : status_update –
    Cache Refresh 2012-03-06 10:19:46 User has permssion : read_stream –
    Cache Refresh 2012-03-06 10:19:46 User has permssion : create_note –
    Cache Refresh 2012-03-06 10:19:46 User has permssion : photo_upload –
    Cache Refresh 2012-03-06 10:19:46 User has permssion : video_upload –
    Cache Refresh 2012-03-06 10:19:46 User has permssion : manage_pages –
    Cache Refresh 2012-03-06 10:19:46 User has permssion : read_friendlists –
    Cache Refresh 2012-03-06 10:19:46 Additional Permissions needed : 0 –
    Cache Refresh 2012-03-06 10:19:46 Getting Pages administered by : 100003219529656 –
    Cache Refresh 2012-03-06 10:19:46 Page info for page ID 259653807427031 The Grand Victory –
    Cache Refresh 2012-03-06 10:19:46 Getting Groups owned or managed by : 100003219529656 –
    Cache Refresh 2012-03-06 10:19:49 Setting Status Name as : The Grand Victory –
    Cache Refresh 2012-03-06 10:19:49 Setting status as : We’re unveiling our new cocktail menu today! $7/cocktail, or four for $20. Check out a description of the menu here: https://t.co/fbN1OLrs
    Cache Refresh 2012-03-06 10:19:49 Setting Status URL as : https://www.facebook.com/TheGrandVictory
    Cache Refresh 2012-03-06 10:19:49 Setting user name as : –
    Cache Refresh 2012-03-06 10:19:49 Cache Refresh Complete for user 100003219529656 –

    Plugin Author Steve

    (@steveatty)

    Kais – if you don’t use Wordbooker for publishing then its not going to be able to work out what the image is because its only when it publishes that it populates the fields – Wordbooker’s primary function is to publish to Facebook. The Like and Share options are an additional benefit and I suppose I could code in all the image stripping functionality but it would slow some page rendering down.

    PLEASE tell me how to help you help me.
    IF I could get the Like and Share to work, I would be inclined to use the rest of the features!

    So, I need to publish something to FB (I just tried in TEST mode and no diag messages showed up)?

    Just tried in LIVE mode and nothing seems to post.
    The diag messages aren’t changing either.

    Is it because the user I’m connected as is a business account?
    Do I need to be connected as a personal account?

Viewing 15 replies - 16 through 30 (of 39 total)
  • The topic ‘[Plugin: Wordbooker] Thumbnail not showing’ is closed to new replies.