WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: Simple Facebook Connect] Limiting the "Like" feature. (18 posts)

  1. wyattjoh
    Member
    Posted 4 years ago #

    Hello,

    I was just interested in knowing if there was a way that i could have the "Like" button enabled to appear before each post, if there was a way that i could add a shortcode or custum code that would enable me to disable the like button on certain posts/pages. Like for example, i wanted to diable the like button on the "About Page". The site im managing right now is http://www.isset.ualberta.ca/students .

    Thanks!

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    The new version adds a like shortcode: [fb-like]. You can add that into your posts to put a like button where you want it.

    If you want to put the code to generate the like button directly in your theme, you can call the sfc_like_button(); function to produce a like button inside The Loop.

  3. enseignement
    Member
    Posted 4 years ago #

    Just a small question :

    Why do you use an iframe, instead of the fb;like tag recommended ?

  4. enseignement
    Member
    Posted 4 years ago #

    Can you also set up the fact that we could comment with the Like button now ?

    The basic Like button is available via a simple iframe you can drop into your page easily. A fuller-featured Like button is available via the <fb:like> XFBML tag and requires you use the new JavaScript SDK. The XFBML version allows users to add a comment to their like as it is posted back to Facebook. The XFBML version also dynamically sizes its height; for example, if there are no profile pictures to display, the plugin will only be tall enough for the button itself.

    Thanks,
    Benjamin

  5. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    No, that is not supported yet. In order for that to work, I'd have to implement the new javascript SDK, which is not backwards compatible.

  6. enseignement
    Member
    Posted 4 years ago #

    Hi Otto42,

    Thanks for your answer.
    DO we need it to be backwards compatible. It would be great to implement it, because it will allow many things (comments, recommendations box in a widget, etc.).

    Thanks for your great work !

  7. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    Well, since it's not backwards compatible, basically the entire plugin would have to be rewritten to do that sort of thing.

    The new Javascript SDK doesn't work with Facebook Connect at all. Period. Since this plugin was designed to implement Connect, that makes it a bit difficult to rewrite to use the new SDK.

  8. enseignement
    Member
    Posted 4 years ago #

    Maybe I got it wrong, but I kind of understanded that Facebook Connect will abandoned in favor of the new Open Graph launched by Facebook.
    Am I wrong ?

  9. Samuel Wood (Otto)
    Tech Ninja
    Posted 4 years ago #

    a) Facebook's Graph API is not the same as the Open Graph. Very important difference.

    b) Eventually, yes. However, Facebook Connect is still supported for now, and the Graph API doesn't have all the same functionality.

    c) A rewrite is in the works, but it will take a long time. So expecting it to work right now is unrealistic. Thus the word "yet" in my original response.

  10. enseignement
    Member
    Posted 4 years ago #

    Thanks for the clarification.
    Here's my ideal wish list ;-) :
    - add recommandations as a widget
    - Put the fb javascript calls in the footer
    - use the javascript sdk whenever it's possible :-)

    Could you explain if the comments feature of the like button will / could post the comment on the FB article in the future ?

    Thanks again ;-)

  11. jonathanjbwebb
    Member
    Posted 3 years ago #

    Hi - returning to the question first posed; I have exactly the same issue/request.

    Rather than removing the automatic setting for the "like" button and then calling it with [fb-like] within every single post, is there any way (as wyattjoh asked) to suppress it on pages?

    Otherwise, if the best option in this case is to add the sfc_like_button(); function directly to the theme so that it appears for posts only, can you help me work out where to put it? I'm a newbie and know almost nothing about php! I'm guessing it goes in single.php somewhere but I don't know precisely where... and my theme also seems to have 2 different files called single.php!

    My site is http://nerd-alert.net

    All suggestions hugely appreciated! Really like the variety of functions this plugin provides. :-)

  12. fitdream
    Member
    Posted 3 years ago #

    What is the KEY or VALUE that goes with the sfc_like_button in the custom fields?

    I too would like to have the "suppress" option with the convenience of the auto-add.

    So, I have the sfc_like_button in my custom fields.

    BUT it is asking for a "value" or "key" and I have no idea what to put in that field to active the suppress feature!

    I'm using infocus theme, if that makes a difference.

    Thanks for any advice!

  13. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    There isn't one, because sfc_like_button isn't a value for custom fields. It's a function call that you can use in your theme if you want to customize its placement.

  14. fitdream
    Member
    Posted 3 years ago #

    Otto,

    Thanks, but where do you add it in the theme and how do you disable it per individual page where you don’t want it?

    I see we are having this conversation on 2 different forums - where's the best place to post?

    thanks

  15. darstr0556
    Member
    Posted 3 years ago #

    For the sfc_like_button(); only in posts edit the loop-single.php file. Place it within the entry-utility class in the last php command(edit_post_link) right above the closing entry-utility div.

  16. bmzero
    Member
    Posted 3 years ago #

    You could also just hide the entire facebook block based on page-id. Example:

    .page-id-39 .fb-like {
    	display: none;
    }
  17. magnus_wigrup
    Member
    Posted 3 years ago #

    I use the following code in the bottom of my index.php but the button seems to refer to the oldest post on the page. Is there anyway that I can make it refer to the entire page instead?

    <span class="sfc_like_button_label"></span>
    	  <?php if (function_exists('sfc_like_button')) echo sfc_like_button(array('layout'=>'deafault','showfaces'=>'true',
    'action'=>'like','colorscheme'=>'light','font'=>'lucida+grande' ));?>
  18. Samuel Wood (Otto)
    Tech Ninja
    Posted 3 years ago #

    The sfc_like_button function will take a 'url' parameter if you want to make a like button that always refers to a specific URL instead of to the "current" post.

    sfc_like_button(array('url'=>'http://example.com'));

Topic Closed

This topic has been closed to new replies.

About this Topic