Feb 072011
 

For my own convenience I wrote another WordPress plugin, which is specialized in adding links of posts that are being published to your Facebook wall or pages. Although you have to create a Facebook application yourself (which is not difficult), the setup is as simple as it can be. Just follow the directions of the plugin. If you encounter a problem, please let me know below and I will try to help you.

The link title will be the post title. The link description will be the excerpt, or part of the post text if there is none. It is possible to configure a link image (WordPress icon, featured image or custom image) or you can let Facebook select one automatically. It is possible to exclude individual post links from being added to your wall or pages by ticking a check box just above the publish button. There is support for multi-user and network sites and shortcodes will be processed. It works for remote publishing too, for example from Android or iOS (iPhone, iPad) powered devices or using Window Live Writer or from Linux using BloGTK or Blogilo.

You can find the plugin here in the WordPress repository.

Install now

Add Link to Facebook

  374 Responses to “WordPress plugin: Add Link to Facebook”

  1. Maybe I’m confused but is the plugin supposed to “post” your blog post to Facebook automatically?

    I tested clicking the “Like” button and noticed the new post then posted to my Facebook profile then I had to “share” to have it posted to my Facebook homepage.

    I may have simple not completed the setup as necessary.

    Please advise and thank you.

  2. I try to document each and every problem you might have in the Frequently Asked Questions section. If your problem is not covered or the answer doesn’t help you, leave a message in the forum and I will try to help you as soon as possible.

  3. Hi Marcel –

    I read in the FAQ that this plugin should post to facebook when a scheduled wordpress post is published, but it doesn’t seem to be working. It works fine if you click “publish” on a post directly, but if you schedule it to post sometime in the future (and then it does) the post won’t go to facebook. Am I missing something? Is there a particular setting I need to make sure I’ve checked?

    Thanks!
    Adam

    • I just tested it to be absolutely sure and it should work for future posts. It could be that another plugin or your theme is interfering. Do you use some kind of front-end publishing plugin/theme?

  4. Great plug-in! However, for some reason the like button on my wife’s most recent blog post populates with the likes for the entire page itself which I have at the bottom of each of her website pages. All the older post have a clear, fresh, like button which is good because no one has liked the post yet.

    I tried to remove the like button for the page itself from the bottom of the footer of the blog page hoping that would resolve it but it did not fix the issue. Any suggestion?

    Eric

    • Oh yeah if it helps to take a look her blog is at http://www.selenasakal.com/Blog/

    • I took a look on the blog and the only explanation I have is that Facebook is doing something wrong. The like button references the correct post, so the plugin seems to do what it should do.

      • Thanks for taking a look at it! I noticed the like button call for the blog is:

        While the like call of have for each page is:

        The href tag specifies the location, correct? In the blog’s case it is href=”http://www.selenasakal.com/Blog/?p=38″ but for the page it is href=”http://www.selenasakal.com”. Do you know if this is the only tag that makes the difference in specifying the location? Do you think if I added “index.html” to the end of the facebook link for the page so it reads href=”http://www.selenasakal.com/index.html” would help?

        • I looked another time and my best guess is that the like button on the pages is not generated by Add Link to Facebook, but by another plugin. Is that possible?

          • No, shouldn’t be. I’m new to WordPress and the only plugin I’ve even downloaded is yours. It works great except for this one little issue I’m having. I manually did the like button for the various pages of the website myself which maybe causing an issue…..just not sure how or why it is affecting the other buttons from the plug-in.

          • One more thing I just thought of. I did put custom meta tags in the header.php of my custom WordPress theme specifically for my facebook like button. They are as follows:

            Think these could be affecting it?

            • Try putting the meta tags between and . But I guess the custom buttons and meta tags could easily interfere with the generated like button. I guess the meta tags are for the Open Graph protocol. The plugin will generate these too, when the Open Graph protocol is enabled.

        • Sorry, the previous post did not show up well. I tried adding index.html to facebook like button href tag but it did not resolve the issue. I’ll have to keep looking around to see if I can figure it out. If you think of anything or have any suggestions on where to start looking please let me know. Thanks for you help!

          Eric

  5. Hi, how can we post link to multiple facebook walls, pages for each post
    Thanks

  6. Hey buddy, great plugin there. I’m trying to create an application account but facebook don’t send me a text message via cell phone nor validates my credit card. Any clue?

    Cheers,
    João

    • A few more people have this problem. There is little you can do about it but to wait quite some time (maybe a week or more :-( ) and try again. Some people tried to contact Facebook about this, but didn’t get a helpful response, but maybe you are more lucky. If you resolve this problem in another way, I am sure those other few people like to know how …

      • Thanks for the heads up. I tried mailing them, but even this looks difficult (to find the propper session).

        Anyway, I’m having a few bugs with the plugin. The image shown is not the one I’ve configured, and the “like” do not show up in some posts. Is it related to not having an App Id yet?

        - João

        • Which image type did you configure? (but: how can an image be shown if you don’t have a Facebook application yet?) The like button should be on every post and page when enabled, independent from if you did create an application or not. Do you have an example where the button isn’t displayed?

          • Sure. I tried both “Featured Image” and “First Image in the post”, none worked. The plugin always retrieve the gravatar “monster” image from the comments.

            You can see here: http://blog.gamerchants.com/

            The posts where the like button didn’t show up are visible in the post list. I’ve added a like button on them manually, then.

            • I fixed your grammar ;-)

              The posts that don’t have a like button show ‘Mais >’. Is this generated by a plugin or by WordPress itself. In case of a plugin it could interfere with Add Link to Facebook. You can try this: find the following line in the file add-link-to-facebook-class.php:

              add_filter('the_content', array(&$this, 'The_content'));

              and replace it by:

              add_filter('the_content', array(&$this, 'The_content'), 1000);

              Could you please let me know if this helps?

              About the images: was there a featured image selected in the first case and was there a image (

  7. People, Marcel is up night and day for us, please don’t forget the possibility of donating. Now adays, it’s often takn for granted that people on the web help out for free, but just a few euros or dollars… it all adds up, cheers, richard

  8. Hello,
    i am trying this great app… Right now the comments are displayed on my personal wall – where can I change the settigs to send a comments to wall of a created fb page? Thanks for help…

  9. Great plugin! Is it possible to make it send link to more than one facebook-page? I want links to go to my personal facebook account and to my page.

    • Is it possible to make it send link to more than one facebook-page?

      Not yet, but maybe in a future version. See also the FAQ, question C04.

  10. Can I assign the connection to a different Facebook account, once configured? I connected it to my own page, but it’s my wife’s site – it needs to go to HER Facebook page…

    Thanks!

    _Mike

    • Easy: just re-authorize with the Facebook account of your wife. You probably have to select the correct page again, unless you are using the personal wall.

      • Yes but I’m not actually clear where to do that!! If I hit Authorize, it just re-authorizes the current page. I’m not sure where to select the actual account it’s tied to so I can assign a different one.

        _Mike

        • I understand what you mean. Just first logout of Facebook, then go to the plugin and press the Authorize button and then login to the Facebook account you want the plugin connect to.

  11. I really like and use this plugin.
    Its great!

  12. This is a great plug-in, but I must be doing something wrong. I thought I was following your FAQ instructions for adding a link for an already-published post — save it as a draft, update it, publish it — but this doesn’t seem to do anything. I tried creating a new post just to make sure I was connecting to the right FB page, and that worked, so I’m not sure what to do. Does it make any difference that these posts were published before your plug-in was installed and activated?

    • It should work, I checked it (with version 0.60). There are two situations I can think of when no links will be added:

      1. The ‘exclude’ check box is ticked
      2. There was already a link added (custom value al2fb_facebook_link_id exists)

      The FAQ instructions for adding a link for an already published post should also work for posts that existed before the plugin was installed.

      Was there an error of any kind?

      • Figured it out. I post a lot of stuff assigned to other authors and I had not checked the “Share with other users” box. The test post that did transfer the link to FB was of course created by me, but the others were not.

        Thanks for your help and for very nice work on this plug-in.

  13. Hi, I got it to work once, but now I see the error: “Add Link to Facebook – : (#200) This API call requires a valid app_id.” on all my dashboard pages.

    • Ok, I think I know what happened. I didn’t realise you could delete the FB post from inside the post editor, so I deleted it on FB. Can I clear the error somehow?

      Thanks.

      • You can clear the error by removing the custom value al2fb_facebook_error from the post edit screen. You may need to enable the custom values post meta box with the screen options (upper right) first. What did you do to get this unusual error?

        • I deleted a link on Facebook rather than from the plugin. I cleared all the custom values, but not it’s not posting at all. All it does is add one custom field:

          al2fb_facebook_image_id = 0

          So close!!

          • Now I understand your situation. You have to remove the existing custom value al2fb_facebook_link_id to add the link again. As long as this value exists, the plugin assumes there was already a link added.

          • Also take a look at this comment.

            • I tried that, but I still don’t get anything posting. It only creates the al2fb_facebook_image_id = 0 field, for any post that I set to draft and the republish. Is there a way I can strip out all the custom fields and try with a clean install?

  14. Can I share the links to several pages at the same time ?

    • Not yet, but it may be possible in a coming version of the plugin. See also the FAQ, question C04 for some more background why I didn’t realize this yet.