Social Plugin for WordPress

The Zolton.org Social Plugin (ZOSP) is a simple plugin for WordPress that integrates a blog with popular social networking sites such as Facebook and Twitter. I wrote this plugin to learn WordPress plugin development, and as a means to decouple these social networking features from my desired WordPress theme.

Download

To download this plugin, visit the WordPress Plugin Page.

Features

  • Includes the Facebook JavaScript SDK in your WordPress theme.
  • Generates Facebook Open Graph tags for posts and pages.
  • Includes the Facebook Like Button and Send Button on posts and pages.
  • Imports the featured image / post thumbnail (if available) from a post or page for use as the featured image on Facebook.
  • Generates a Facebook Comment section for posts and pages.
  • Includes the Twitter Tweet Button on posts and pages.
  • Includes the Google +1 Button on posts and pages.
  • Includes the Pinterest Pin It Button on posts and pages.
  • Optionally hides WordPress comments.
  • Configurable via WordPress settings page.

Screen Shots

Zolton.org Social Plugin 1.4.0

Zolton.org Social Plugin 1.4.0 Settings

Requirements

Installation

  1. Unzip the archive to your /wp-content/plugins/ directory.
  2. Activate the plugin via the “Plugins” menu in WordPress.
  3. Edit the “Required Settings” via the “Settings / Social Plugin” menu in WordPress. At the very least, you need to specify a Facebook App ID and a Twitter username.
  4. Optionally edit the “Advanced Settings” via the “Settings / Social Plugin” menu in WordPress.
  5. That’s it!

FAQ

Q. Facebook Comments display the error “Warning: http://somesite.com/somepage/ is unreachable”.
A. Try using Facebook’s URL Linter to see if the URL for the page in question generates any errors.

Q. The Pinterest Pin It button does not display despite the fact that it is configured to do so.
A. The Pinterest Pin It button requires that the post or page include a featured image. Check your post or page to ensure that a featured image is set.

Add a Facebook Comment

38 Responses to Social Plugin for WordPress

  1. Sam says:

    How do I replace the “comment using” AOL button with a Google one?

  2. Mark Zolton says:

    @Sam,

    I don’t believe Facebook Comments allows you to use Google as an authentication source. You can use AOL, Yahoo!, and Hotmail.

  3. Storm says:

    Hi,
    plugin works great! I’m a little confused about the Twitter account and App ID requirements, seeing as there is no settings page for the plugin. So, tweets would be sent as regular tweets, without a “via @” or RT. I also don’t see any way to remove/moderate/hide comments etc

    Am I missing something? I have searched for a link to a settings page, but I’m quite sure there isn’t one.

  4. Mark Zolton says:

    @Storm,

    You are correct, there is no options/settings page for the plugin. You will need to edit the variables at the top of the plugin source code. I haven’t had the time to add an options/settings page. Maybe in a future version.

    The App ID is your Facebook App ID (assuming you created one, I highly recommend it), and the Twitter username will be where you want @ replies (at replies) sent to on Twitter.

    Including a Facebook app ID will allow you to use Facebook’s comment moderation tool.

  5. Would be useful if we didn’t have to update the settings via the edit every time we upgrade. Other than that, a great addition.

  6. mkultra says:

    Hi, I’m having trouble getting any comments to show, I can see the Twitter icon only (http://tinyurl.com/6dttgqz). I’ve changed the app id in your source to my own and also added in a twitter account of mine. Any idea why the comments might not be showing? (I’ve had the same problem with other plugins I’ve tried, eg Facebook comments for WordPress but I don’t seem to be able to talk to anyone about it). Thanks!

    • Mark Zolton says:

      @mkultra

      I visited the link you provided in your comment. The plugin seems to be working well. I am able to see the Tweet, Like, and Send buttons along with the Facebook comment box. I am using Chrome 12. I also tested with IE 7 and IE 8 and everything seems to be functioning correctly. I don’t have IE 9 yet.

      Please let me know if you were using IE 9 when you experienced this problem and I will get my system upgraded to IE 9 so I can help you out.

      • mkultra says:

        Hmm that’s really strange, I thought something may be getting blocked but I tried on another computer at home too and got the same thing (with the wordpress comments plugin, not this one). I’ve tested on Chrome 12 and also IE 9 here but no luck. Maybe a caching issue or something?

        • Mark Zolton says:

          Quite frankly, I’m not sure. However, I would say that if you are having a problem with other plugins, which surely implement the Facebook comments in a similar fashion, then the problem likely lies with the browser or some sort of caching service and not the plugin itself. Just to be sure, I commented on your “Hello World” post and it posted to my Facebook wall, no problem.

          I sure would like to help you get to the bottom of this though. Do you have any sort of caching plugin for WordPress, or maybe your ISP caches requests to make your Internet connection appear faster?

          • mkultra says:

            I tried it in a few different places, it seems to be blocked for some reason here, but works fine elsewhere! Thanks for your help :) , looks great.

  7. Matt Royce says:

    Loving the plug-in! But you should have an option to position the buttons (i.e. top of the post, bottom of the post, etc.’) and you should also have the option whether or not to actually use the Facebook comments.

    But otherwise, it’s great – well done!

  8. Erik says:

    Thank you Mark!
    Really like this one. Are there any thoughts on doing some kind of “Recent comments” plugin or saving the Facebook comments into the wp comments table? (Is it possible?)

  9. paten says:

    Thx for the great plugins zolton, it works but after i added a little script like this in the comments.php:
    “”

    thats the script on the facebook developer page when i first try to get it work on my web, and i don’t know why it works that way :? i’m not a developer btw..

    what i want to ask is, i wonder how to change the CSS style on the facebook comments, i wanted to make the text comment to be white, or the BG to be different(not transparent like default one)

    thx.. :)

  10. Mark Zolton says:

    @paten, It doesn’t look like the script you posted is coming through. I believe WordPress has stripped the code.

    WRT to changing the styling on Facebook Comments, your options are very limited. You can’t apply a style sheet directly to the comments. The best thing you can do is choose the “light” or “dark” color scheme provided by Facebook.

    To use the “dark” color scheme will require you to edit the plugin source code. To do this, use the WordPress Plugins / Editor menu option. Select “Zolton.org Social Plugin” from the select box on the right. This will give you a list of source file for the Zolton.org Social Plugin. Make sure the zozp.php file is highlighted, and scroll down to the section that says:

    < fb:comments href="{$url}" num_posts="3" width="{$width}" publish >< /fb:comments >

    Add colorscheme=”dark” as a parameter in the fb:comments tag. This should switch the Facebook Comments to the “dark” color scheme.

    Thanks for pointing this out. I may add this as an option on the settings page in a future version.

    • how exactly do you Add colorscheme=”dark” as a parameter in the fb:comments tag???

      thanks!

      • Mark Zolton says:
        1. From your WordPress dashboard, select Plugins / Editor.
        2. Then choose the Zolton.org Social Plugin from the select box on the right.
        3. Edit “zoltonorg-social-plugin/zosp.php”.
        4. Add colorscheme=”dark” to the following block of code, like so.
        <!-- ZO: Facebook Comments -->
        <div id="facebook-comments" style="width: {$width}px;">
        <h3 id="facebook-reply-title">Add a Facebook Comment</h3>
        <fb:comments href="{$url}" num_posts="3" width="{$width}" colorscheme="dark" publish></fb:comments>
        </div>
        <!-- ZO: End Facebook Comments -->
        

        Let me know if that doesn’t help.

  11. Hi Mark,

    I am very new to the whole wordpress scene and I am running into a bit of trouble with the plugin. Your plugin is good. But I have a couple of questions regarding it.

    -How can I change the font color of comments from fb users?
    -Is there a way I can incorporate fb comment count to display on the posts in my home page? (all of my posts say 0 comments but there are some fb comments. I think my theme is checking for wordpress comment counts and not fb comment counts).

    Any help or advise you can offer would be greatly appreciated!!

  12. Wesley says:

    Hey Mark
    tnx for the great plugin! I’m trying to figure out how to show the social google+, Twitter & FB buttons on the main page as well. Now they only show up when u enter a blog post and go to single blog post view but i want people to be able to share them from the Homepage.
    tnx!

  13. David says:

    Hello
    Is there any way to remove Facebook, Twitter and Google +1 button from WordPress Pages?
    I want them just on my posts.
    Thanks

    • Mark Zolton says:

      Yes there is. The Social Plugin obeys WordPress’ discussion settings. Go to your page, and under the “Discussion” section, un-check “Allow Comments”. Now, if you still want comments on your pages, but not the social icons for Facebook, Twitter, etc., then I am afraid there is not a way to toggle them independently. I can certainly put it on my list of things to research for the next version though.

  14. Martin Smith says:

    I’ve used your plugin and I’m getting the following error message on all of my posts

    Fatal error: Call to undefined function has_post_thumbnail() in /home/satorima/public_html/wp-content/plugins/zoltonorg-social-plugin/zosp.php on line 225

    I’ve deactivated the plugin for the time being, can you help? Thanks, Martin

  15. David Lockie says:

    I found a fix for one cause of the URL Unreachable issue if anyone’s interested: http://www.pragmatic-web.co.uk/facebook-comments-wordpress-plugin-url-unreachable-fix/

  16. PJhelton says:

    Hello Mark,

    Thank you for sharing such a great plugin for everyone.

    My issue is currently with Pin it button function.

    On one blog, I set featured image and it display when I clicks pin it button, along with description and work perfectly.

    But on another (default wp blog no plugins) site the pin it button displays when i have a featured image, but when I click the pin it button, no image, and no description is going to be posted it is blank.

    Have you heard this issue and know what may be cause it?

  17. Steve says:

    I was looking through your code and am not seeing a way to disable the social buttons for pages (I just want them on my posts) How do I fix that?

  18. Andrea says:

    Mark,

    Thanks for a great plugin. Is there a way to view more than 3 comments at a time?

    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>