• Resolved nlsubtitles

    (@nlsubtitles)


    Hi,

    I have another simple question.
    I use WP User Frontend so the users of my site can edit their profiles and add new posts from the front end.

    The “Connect this account to facebook” button from the SFC plugin displays correctly on the front end.
    When it is clicked a FB window pops up asking for permission as usual.
    When that’s done there is no refresh (which it does do in the backend), and when I press the Update Profile button on the front end, the FB account is not connected to WP. BUT the app is in the app section of the FB user..

    Am I missing anything?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter nlsubtitles

    (@nlsubtitles)

    The button on the front end is displayed with:
    do_action( 'profile_personal_options', $profileuser );

    And it is updated with:

    do_action( 'personal_options_update', $user_id );
    do_action( 'edit_user_profile_update', $user_id );

    What actions am I missing?

    Thread Starter nlsubtitles

    (@nlsubtitles)

    Searched through the SFC plugin files and I found a solution!

    in sfc-login.php I replaced the following line:
    add_action('admin_footer','sfc_login_update_js',30);
    with
    add_action('wp_footer','sfc_login_update_js',30);

    and in the same file sfc-login.php in the sfc_login_update_js function I replaced
    if (defined('IS_PROFILE_PAGE')) {
    with
    if (is_page('profile')) {

    What this does is that it displays the piece of javascript in the wp_footer and it only displays when on my edit profile front end page.

    Normally, the piece of javascript only displays in admin_footer and on the Edit Profile back end page.

    It’s probably a pretty dirty solution, and I don’t know if there are any security issues, but it works!

    Thank you heaps for this!

    Could you go into a little bit more depth with your edited code? I am close, managed to get the connect with FB to show up on front end.

    However it won’t refresh and show the connection.

    Also I am having trouble disconnecting accounts once connected, not sure what going on there 😐

    If you could post your edited sfc-login.php and give me any tips that would be great!

    Wish they had a shortcode for doing what we are trying.

    Thread Starter nlsubtitles

    (@nlsubtitles)

    The fact that it does not refresh and show the connection is probably because of the absence of the javascript code in your footer.
    The same for the disconnecting.

    open your sfc-login.php and do a search (ctrl + f) for:
    add_action('admin_footer','sfc_login_update_js',30);
    and replace that exact line with:
    add_action('wp_footer','sfc_login_update_js',30);

    Then, do another search for:
    if (defined('IS_PROFILE_PAGE'))
    and replace that exact line with:
    if (is_page('profile'))

    My frontend edit profile page where the wpuf editprofile shortcode is located is named ‘Profile’ and has the slug ‘Profile’.. so that’s why
    it is is_page('profile').. if the page where your wpuf shortcode is located has another name, for example: Editpage.. then the code will be:
    if (is_page('Editpage'))

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Simple Facebook Connect] Front end "Connect this account with facebook" button’ is closed to new replies.