Support » Plugin: Easy Social » [Plugin: Easy Social] Facebook & Send Feature picking up random images from posts – Please help.

  • Hi Alex, luv the pluggin…but experiencing a funny little quirk. Every time someone selects the Facebook like feature or the send for a post it sends the post however the image in the post is not being displayed what is being displayed is random image found in one of my widgets menu. So you have a completely unrelated image for the post being carried over into Facebook. Can you offer some guidance on how to correct. Thanks!

    Reposted here from your blog. Thanks

    http://wordpress.org/extend/plugins/easy-social-media/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Can anyone offer some guidance?

    Can anyone offer guidance or suggestions?

    hmm interesting. Guess I never noticed that until you pointed it out. I went back to the site that I’m using the plugin on and tested, and here’s how it seems to be working for me:

    If there’s an image in the post that I’m trying to “send”, then it uses that image when doing the send.

    If there’s no image in the post being sent, it seems to pick an image from someplace else on the site, not sure why.

    I looked @ the code for the module, and I can’t see anything in there that is making this happen. It kind of looks like the FB send button code is picking this up on its own.

    The code that the module uses to generate the buttons is pretty simple:

    function add_social_buttons($content, $url = '') {
    		$social .= '<div id="easy-social-buttons">';
    
        if ($url) {
          $href = array (
            'fb' => ' data-href="' . $url . '"',
            'twitter' => ' data-url="' . $url . '"',
            'google' => ' href="' . $url . '"',
            'linkedin' => ' data-url="' . $url . '"',
            'stumbleupon' => ' location="' . $url . '"',
          );
        } else {
          $href = array ();
        }
    		//Facebook Button
    		$social .= '<div class="easy-social-button fb-easy-social"><div class="fb-like" ' .
          $href['fb'] . 'data-send="true" data-layout="button_count" data-show-faces="false"></div></div>';

    As you can see, the only thing that the page is sending to FB is the href… FB takes care of creating the rest of the code based on that, so I’m not sure why they’re picking up random images from the site.

    If there is an image in the content that you’re trying to share, does it pick up that image or a random one?

    (the site I have this on is http://coolersa.com btw if you want to see how it works there)

    Hi thanks for responding. To answer your question, “If there is an image in the content that you’re trying to share, does it pick up that image or a random one?”
    Yes.

    The interesting thing which I just noticed, is that it seems to pick and choose….meaning on some post (I guess the more recent ones) it will work. The image in the post will post to Facebook but on some older posts it selects the random image from anywhere on the site.

    Is there away to force it to send FB the image in the post and link as oppose to just the href? I would think it by forcing then FB would render the right information for the rest of the code.

    Yeah it’s kind of a strange error, because I don’t see anything in the FB API docs that indicates we can specify the image that FB will use…

    The available attributes for the like button (and combined like/send button which is what the plugin is using): (http://developers.facebook.com/docs/reference/plugins/like/)

    href - the URL to like. The XFBML version defaults to the current page.
    send - specifies whether to include a Send button with the Like button. This only works with the XFBML version.
    layout - there are three options.
    standard - displays social text to the right of the button and friends' profile photos below. Minimum width: 225 pixels. Minimum increases by 40px if action is 'recommend' by and increases by 60px if send is 'true'. Default width: 450 pixels. Height: 35 pixels (without photos) or 80 pixels (with photos).
    button_count - displays the total number of likes to the right of the button. Minimum width: 90 pixels. Default width: 90 pixels. Height: 20 pixels.
    box_count - displays the total number of likes above the button. Minimum width: 55 pixels. Default width: 55 pixels. Height: 65 pixels.
    show_faces - specifies whether to display profile photos below the button (standard layout only)
    width - the width of the Like button.
    action - the verb to display on the button. Options: 'like', 'recommend'
    font - the font to display in the button. Options: 'arial', 'lucida grande', 'segoe ui', 'tahoma', 'trebuchet ms', 'verdana'
    colorscheme - the color scheme for the like button. Options: 'light', 'dark'
    ref - a label for tracking referrals; must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). The ref attribute causes two parameters to be added to the referrer URL when a user clicks a link from a stream story about a Like action:
    fb_ref - the ref parameter
    fb_source - the stream type ('home', 'profile', 'search', 'ticker', 'tickerdialog' or 'other') in which the click occurred and the story type ('oneline' or 'multiline'), concatenated with an underscore.

    Nothing there that looks like a way to specify that image to me…

    I checked the FB API for the separate send button too in case there were some attributes there that maybe we could use, but nothing there either: (http://developers.facebook.com/docs/reference/plugins/send/)

    href - the URL to send.
    font - the font to display in the button. Options: 'arial', 'lucida grande', 'segoe ui', 'tahoma', 'trebuchet ms', 'verdana'
    colorscheme - the color scheme for the button. Options: 'light', 'dark'
    ref - a label for tracking referrals; must be less than 50 characters and can contain alphanumeric characters and some punctuation (currently +/=-.:_). The ref attribute causes two parameters to be added to the referrer URL when a user clicks a link from a stream story about a Send action:
    fb_ref - the ref parameter
    fb_source - the story type ('message', 'group', 'email') in which the click occurred.

    So from what I’m seeing it kind of looks like a FB bug with however they’re choosing images. I guess a workaround would be to put an image in the article that you want to share… kind of an annoying workaround I know but I’m not sure what else to suggest… sorry I don’t have a better solution for ya 🙂

    Yeah I see what you mean. The articles do have an image…so it’s definitely a bug. I wish Alex would respond or least look at the issue to see if he thinks there’s a solution or come up with a workaround. But thank you for taking the time to look into it.

    Plugin Author osuthorpe

    (@osuthorpe)

    I have fixed this error in the last update. Let me know if you are still having trouble after the update.

    @osuthorpe:

    Would it be possible for you to elaborate on what you did to fix this issue? I’m using a modified version of your plugin w/several other changes (specify target url, add classes to each link, etc), so it’s hard for me to test the new update since I’ll lose my changes.

    If you can let me know what it was that needed to be changed though, then I can update my modified code for this as well. Once I get this fix put into my modified plugin, I’ll do a diff between my code and the latest version and post here.

    I think most (if not all) of the changes I made are listed in this other thread: http://wordpress.org/support/topic/plugin-easy-social-modification-to-easy-social-code-to-allow-specifying-of-the-url-to-share?replies=4

    Thx!

    [sig moderated as per the Forum Rules]

    Actually, Alex fixed it in the new release of the plugin. Just update your plugin. It worked for me.

    Yeah I know I wanted to know what he updated, since the latest version (1.3) that I downloaded doesn’t have some other things in it that I’ve changed on my own modified copy…

    Oh, yeah that unfortunately I don’t know. Between you and me I was just happy it worked. 🙂

    Simple answer guys. Sorry I couldn’t be here sooner! In your template head.. You need your PHP to write in the new OpenGraph Meta tag standards being supported by Google, FB, and I think Twitter.

    The Open Graph Protocol

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Easy Social] Facebook & Send Feature picking up random images from posts – Please help.’ is closed to new replies.