WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Add Link to Facebook

Automatically add links to published posts or pages to your Facebook wall, pages or groups and more

Setup guide

If you have more than one Facebook account, either logout completely or login to the correct account before you start.

If you want to add links to a fan/community/business page, authorize the plugin with a personal account that owns to the page.

If you have a multi-site installation, create a separate Facebook application for each site.

Never delete an existing Facebook application, because you could delete the links added through it too.

  1. Click on the link Click here to create in the yellow box on the settings page
    • Or click here
    • Click Apps (top menu)
    • Click Create a New App
    • See also the screenshots
  2. Create the Facebook application:
    • Give it any display name you like (will appear as via below the added links) and press Create App
    • Go to the application settings (left menu)
    • Click Add Platform (big button) and select Website
    • Copy the red URL from the Easy setup section of the plugin settings page to the field Site URL
    • Press the Save Changes button
    • See also the screenshots
  3. Copy the App ID and App Secret from Facebook to fields in the Easy setup section of the plugin settings page
  4. Press the Save button to save the configuration
  5. Press the Authorize button, login if needed and allow the plugin to add links to Facebook

Note that you don't have to submit the Facebook application to the App Directory to use it (you can ignore the red warning triangles).

Some people need to verify their account before they can create an application. If you want to use your mobile phone number, take care that the phone number is correct. When it was wrong, you have to wait more than a week before you can try again. If the standard procedure doesn't work, you can try this page.

Setting up Facebook registration form / login button: see question U29 of the FAQ

If you are having a problem, you can probably find the solution in the FAQ. If you need help, you can leave a message on the support forum.

If you need to setup the plugin again for some reason, just remove the Facebook App ID & Secret from the Easy setup section of the plugin settings page.

User Guide

Easy setup

Everybody has to start here. Just follow the short instruction on the setup page or the setup guide above. The first goal is the acquire the following two values from Facebook:

  • App ID
  • App Secret

After entering these values you should authorize the plugin. The plugin will use the App ID and Secret to obtain an access token, which is required to access your Facebook wall.

Common problems:

  • To create an application you have to verify your account
  • Error Given URL is not allowed by the Application configuration: see question E03 of the FAQ
  • cURL error: see question E11 of the FAQ

For administrators (capability manage_options) there is one option in this section:

  • Share with all users on this site

The default is that each user of your weblog has to setup/authorize the plugin. If you check this option all users will use your access token. After checking this option the setup page of the plugin will be accessible only to the administrator that enabled this option. Note that all users will use your name. You may want to choose Avatar of author as link picture (see below).

Additional settings

Link picture

Links on Facebook can have a link picture, which is displayed between your Facebook profile picture and the link text(s). The plugin offers several options to automatically select a picture:

  • WordPress logo: the default, unless Default picture URL is filled in
  • First attached image: the image which was first uploaded on the post page
  • Featured post image: for themes that support a featured image only
  • Let Facebook select: this often doesn't work as you want to, because Facebook can select for example a header image
  • First image in the post: similar to first attached image, but the image doesn't have to be associated with the post
  • Avatar of author
  • Custom picture below: complete URL to a static picture of your choice

Most users probably want to use First image in the post. This is also the best option for users that use remote publishing.

Note that the default picture is used if no link picture could be found, for example if there was no featured post image selected or when there was no picture in the post.

No picture at all is not officially supported by Facebook, but you can try to use an invalid custom picture.

Pages and groups

The plugin can add a link to a page or group wall of your choice. Just check what you want, page or group, press Save and select the page or group you want to add links to. For pages it is possible to add links as page owner, instead of with your personal account. For groups this is not possible, since Facebook doesn't support it.

Link appearance

Some visual aspects of added links can be controlled, but most of the layout is entirely determined by Facebook. The plugin will strip all markup, since Facebook doesn't allow it.

To better understand some of the options take a look at the screen shot to see what is what.

  • Use site title as caption: replace the URL by your blog title (shown below the option)
  • Use excerpt as message: by default there is no message, but if you like you can use the standard WordPress excerpt (if any)
  • Text trailer: if you use this option, the text will be truncated (whole sentences) and the text trailer will be appended
  • Keep hyperlinks: by default hyperlinks are stripped, leaving the title (if any), this options reverses that
  • Add 'Share' link: this option is experimental, because it is not officially supported by Facebook (it is not documented)
  • Use short URL: see question U15 of the FAQ for details
  • Add links for new pages: by default only links will be added for new posts, check this option if you want the same for new pages

If you use a text trailer, you should know it is just a text and it is not clickable. The text including the trailer will not be longer than 256 characters, this is what Facebook will display at maximum without truncating the text. Note that the text could be shorter, because the plugin will truncate the text after periods only (sentences). You can change the default maximum text length with trailer of 256 characters using a plugin option. If you don't use a text trailer, the complete post/page text up to 10,000 characters will be sent to Facebook and Facebook will truncate the text at 256 characters and display Read more, which when clicked will reveal the complete text. You can change the default maximum text length of 10,000 characters using a plugin option, but you shouldn't set it above 10,000 characters, since Facebook will report an error above this hard limit.

Comments and likes

Please be aware that comment integration could harm the privacy of other Facebook users!

  • Integrate comments from Facebook: show Facebook comments in WordPress
  • Post WordPress comments back to Facebook: show WordPress comments on Facebook
  • Copy comments from Facebook to WordPress: store Facebook comments in the WordPress database, so you can for example edit them
  • Integrate likes from Facebook: show Facebook links as WordPress pingbacks
  • Show likers below the post text: show a comma separated list of Facebook liker names at the bottom of your post

Comments copied from Facebook to WordPress are subject to moderation and notification, depending on the WordPress discussion settings.

Link Facebook comment to:

  • None: no link at all, good for privacy
  • Profile author: default, link to the profile page of comment author
  • Added link: link to the discussion on the added link

The Facebook author name is always shown.

The plugin only mirrors comments on links it added. In summary it works like this:

  • The plugin adds a link to Facebook
  • Somebody writes a comment on the link on Facebook, if enabled the plugin will mirror the comment to WordPress
  • Somebody writes a comment on WordPress, if enabled the plugin will mirror the comment to Facebook, using your Facebook account

You can disable comment integration for individual posts/pages by selecting Do not integrate comments on the post page.

Standard Facebook buttons

The plugin can as an extra add a standard Facebook like button/box and/or send button to your post. The layout is mostly determined by Facebook. You can only control the general layout, if there will be faces, the width, the action (like or recommend), the font and color scheme. See for details the Facebook documentation.

By default the buttons will be shown below your post/page text, but you can change that by checking Show at the top of the post. If you want more control over the location of the buttons, you can use a shortcode or template tag. See question U23 of the FAQ for details.

There are options to suppress showing the like and send button on your home page, on individual posts or pages, in archives and in categories. It is also possible to check Do not add like button on the post page to suppress showing the like/send button for individual posts.

By default the like button will link to the post or page where it is shown (recommended). It is possible to change this to a static URL with the Link to option. Use with care.

If you use a Facebook like button, you should enable the Open Graph protocol (unless you use another plugin for this purpose). Most problems with the like button do find its cause in not using the Open Graph protocol.

Other options

If you explicitly want to select when to add, check the option Do not add link by default. Alternatively you can select Do not add link to Facebook on the post page to prevent the plugin from adding a link.

If your post overview is already full of extra columns, you could check the option Don't show a summary in the post list.

I have never had a report about it, but if you have problems displaying the correct characters on Facebook, you could use the Facebook character encoding option to override the default character encoding (UTF-8).

When you don't want to use the plugin anymore, you can check Clean on deactivate before deactivating the plugin to erase all options. This doesn't erase the administrator option, however.

Checking the option I have donated to this plugin will remove all the donate buttons and links. Developing this plugin took many hours. A small donation as a token of your appreciation is always welcome.

Please let me know if you think this plugin is good or bad by rating it. Checking I have rated this plugin will remove the rating reminder message. If you don't like the plugin, please let me know why. If the plugin isn't working for you, help is just one question away.

Administrator options

The administrator options can only be changed by an administrator (obviously) and apply to all users.

The plugin needs to communicate with Facebook. The default timeout time is 30 seconds. If your server has a slow connection, you may have to increase the timeout time to for example 60 seconds.

When you are running a multi-user weblog, you probably want to check Do not display notices to restrict the plugin notices, mostly error messages, to the plugin setting page only. And maybe you don't want to allow usage of the plugin to all users. This is what the option Required capability to use plugin is for.

When comment integration is turned on, Facebook comments are fetched every 10 minutes by default. You can use the option Refresh Facebook comments every to do this more or less often, maybe depending on the number of visitors of your weblog.

See link appearance section above for a description of the text length options.

The plugin supports custom post types if the custom post type support custom values. Sometimes you don't want to add links for certain custom post types. That is where the option Exclude these custom post types is for. Enter the names, separated by comma's for which you don't want the plugin add links.

Speaking about excluding things, maybe you don't want to add links for certain categories. You are in luck, because you can use the option Exclude these categories for this. You should use catergory id's, not names.

If your server isn't setup completely right, there could be problems making a secure link to Facebook. In case you get cURL error 60, you can try the option Do not verify the peer's certificate as a workaround. Of course this is less secure ...

Widget

Please be aware that showing Facebook comments and status messages in the widget could harm the privacy of other Facebook users!

You can read here in the WordPress codex how widgets work.

The Add Link to Facebook widget can display:

  • Facebook comments on added links
  • Facebook status updates from your wall
  • Facebook like button
  • Facebook send button
  • Facebook icon with a link to your Facebook profile

The widget is only shown on single posts or pages (not on the home page or elsewhere). Facebook comments, status updates and the profile link are only shown if the post author has authorized the plugin (or when the option Share with all users on this site is enabled). The link to the author follow the comment integration settings (None, Profile author or Added link). The styling (layout, colors, etc) of the widget depends on the styling of your theme. You can add additional styling rules using a plugin option.

Acknowledgements

This plugin uses:

Requires: 3.2 or higher
Compatible up to: 3.9
Last Updated: 2014-4-18
Downloads: 1,514,515

Ratings

4 stars
4.6 out of 5 stars

Support

12 of 12 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

0,1,0
0,1,0
100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
0,1,0 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,3,3 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,8,8 0,1,0 100,1,1 67,3,2 100,1,1 100,1,1 100,2,2 100,2,2 33,3,1
98,55,54 100,3,3 92,12,11 100,7,7 100,6,6 100,7,7 100,3,3 100,4,4 100,1,1 100,3,3 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,1,1 100,1,1 100,1,1 100,2,2 100,1,1 100,6,6 100,4,4 100,1,1 100,2,2 100,2,2 100,1,1 100,5,5 100,4,4 100,1,1 67,3,2 0,1,0 100,1,1 100,4,4 100,1,1 67,3,2 100,4,4 100,7,7 100,4,4 100,10,10 83,6,5 100,1,1 100,1,1 100,1,1 100,1,1
100,9,9 100,5,5 75,4,3 100,1,1 100,2,2 100,2,2 93,14,13 100,1,1 100,1,1 75,4,3 100,1,1 100,1,1 100,4,4 100,4,4 100,2,2 100,4,4 100,1,1 100,2,2 100,3,3 100,2,2 100,1,1 100,1,1
100,1,1 100,1,1 100,2,2 100,2,2 100,1,1 100,1,1
0,1,0 100,1,1 100,1,1 100,5,5 100,3,3 86,7,6 100,6,6 100,2,2 86,7,6 100,4,4 100,9,9 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1
100,7,7 100,7,7 97,36,35 100,5,5 100,2,2 86,7,6 100,2,2 100,2,2 100,9,9 100,53,53 100,6,6 100,7,7 100,15,15 91,11,10 100,3,3 100,21,21 100,12,12 100,7,7 100,10,10 100,1,1 100,1,1 100,1,1 100,1,1 100,1,1 100,2,2 100,1,1 0,1,0 100,1,1 100,1,1 100,2,2 100,5,5 100,6,6 100,18,18 92,12,11 100,8,8 100,10,10 100,10,10 100,12,12 93,15,14
100,4,4 100,1,1 100,1,1 83,6,5 97,29,28 96,26,25 100,2,2 80,5,4 100,18,18 100,15,15 100,2,2 100,2,2 0,1,0
91,11,10 92,13,12 91,23,21 83,18,15 90,21,19 100,2,2 88,16,14 81,16,13 100,2,2 100,11,11 100,16,16 85,34,29 100,16,16 96,23,22 93,30,28 100,2,2 96,69,66 93,54,50 100,1,1 100,10,10 50,2,1 100,5,5 100,1,1 100,2,2
97,32,31 88,8,7 100,3,3 75,4,3 81,21,17 89,44,39 96,27,26 89,47,42 83,18,15 67,3,2 100,1,1
100,17,17 95,19,18 100,2,2
82,11,9 100,27,27 91,35,32 100,38,38 100,16,16
100,67,67 100,2,2 94,18,17 100,7,7 100,9,9 100,1,1 100,3,3 100,2,2 100,2,2 100,4,4 100,3,3
100,1,1 50,4,2 100,4,4 100,5,5 75,8,6
71,7,5 100,4,4 100,1,1 100,1,1 67,3,2 0,1,0 100,2,2
50,2,1
100,1,1 0,1,0 75,4,3 100,1,1
67,3,2
100,4,4
100,1,1 0,2,0
100,1,1 100,1,1 33,3,1