Skip to:
Content
Pages
Categories
Search
Top
Bottom

WP-FB connect profile.


  • MJ
    Participant

    @jimcale

    Hello everyone,

    when someone logs in with Facebook they can post stuff but they do not have a profile, for example if you click on the profile picture or name it leads to homepage. any solution for this?

    i want users to have profile as anyone else when they login in with facebook.

    thanks in advance for your help.

Viewing 16 replies - 1 through 16 (of 16 total)

  • Bowe
    Participant

    @bowromir

    Check the settings page of wp-fb connect, you should tick a box which enables some buddypress stuff and fixes the problem with usernames.


    MJ
    Participant

    @jimcale

    thanks for the reply Bowe, but i dont see any special settings that can solve this problem. users are able to login and post stuff but they maintain no profile and what post cannot be viewed individually.


    peterverkooijen
    Participant

    @peterverkooijen

    Apparently there are hooks, actions, filters and other mysterious things you can use to add your own functions to get more data or do stuff – see Buddypress.php in the plugin folder. I have no clue how that works. You’ll have to search through the thread on the plugin page or be real nice to the developers.


    Bowe
    Participant

    @bowromir

    Are you sure that you have the right plugin? Its called wp-fb autoconnect, and its from justin klein. It should create a login for facebook and you can configure it on the wp-admin/settings page. It works great on my install and you dont have to do any special stuff to got it working, no idea why you say stuff like that peter…


    peterverkooijen
    Participant

    @peterverkooijen

    @Bowe, I think jimcale wants to pull in additional data from the Facebook profile to fill out the profile on Buddypress. Out of the box the plugin does the basics very nicely – I have it live on three sites with integration to my mailing lists.

    But theoretically you can do much more with it. Haven’t had time to really look into that yet – my day job is not in web development.


    MJ
    Participant

    @jimcale

    thanks guys for the replies, i think i have the right plugin, what i am saying is , does the plugin create a profile page for user when they login with facebook? if it does i dont see that, the user is able to login, post and visit other users but have has no profile on the site its kind odd.


    Bowe
    Participant

    @bowromir

    No you should indeed have a profile created for you automatically.. It should be a regular BP profile with all the functions BP has to offer. Could you check out the following:

    When you go to the members page on your install.. you should see the user who are logged in/signed up through facebook. Now go to one of those members and check the url to their profile (mouseover the username if you use firefox or with IE right click > properties). You should see a username without spaces like mysite.com/members/bowe. If you see spaces or a a long list of numbers, your plugin is not configured correct.

    Let me know :)


    MJ
    Participant

    @jimcale

    Thanks Bowe for the prompt answer, you are right i am seeing spaces between username ex.

    FIRSTNAME LASTNAME or FIRSTNAME%LASTNAME. i was thinking this is the problem. but how can i solve it ?

    also the FB user cannot send msgs, or join groups, just login and can post in the activity.

    thanks appreciate your answers.


    MJ
    Participant

    @jimcale

    Any hope in this one? without the profile this plugin will not be useful.


    joshmac
    Participant

    @parkstreet

    @jimcale, you are getting those spaces because in the settings Disable Buddypress Filters is checked. This should be unchecked.


    MJ
    Participant

    @jimcale

    parkstreet thanks a lot, i didnt thought about that option. wow. it works now.

    May i ask if there is anyway to retrieve user avatar from facebook? thanks


    joshmac
    Participant

    @parkstreet

    @jimcale, there are supposedly hooks that you can use; I am working on it but haven’t figured it out yet. If there are coders out there that can give me a hand, that would be great; two heads are better than one.


    joshmac
    Participant

    @parkstreet

    Ok, this is what I’ve come up with so far in order to get the user’s facebook profile pic. However, they disappear when you log in. If anyone is willing to add to this to give it the finishing touch it needs or can tell me what to add that would be great.

    add_action('wpfb_login', 'bp_jfb_get_avatar');

    function bp_jfb_get_avatar($avatar, $id_or_email='') {
    global $comment; $id_or_email;

    if(is_object($comment)) {
    $user_id = $comment->user_id;
    }

    if (is_object($id_or_email)) {
    $user_id = $id_or_email->user_id;
    }

    if (is_array($id_or_email)) {
    if ($id_or_email['object']=='user') {
    $user_id = $id_or_email['item_id'];
    }
    }

    if (get_usermeta($user_id, 'facebook_uid')) {
    $user_info = get_userdata($user_id);
    $jfb_suffix = '';

    if ( $id_or_email['width'] ) {
    $jfb_size = $id_or_email['width'];
    if( $jfb_size < 32 ) {
    $jfb_suffix = 'm';
    } else if ( $jfb_suffix < 64 ) {
    $jfb_suffix = 'n';
    } else {
    $jfb_suffix = 'b';
    }
    } else if ( 'full' == $id_or_email['type'] ) {
    $jfb_size = BP_AVATAR_FULL_WIDTH;
    $jfb_suffix = 'b';
    } else if ( 'thumb' == $id_or_email['type'] ) {
    $jfb_size = BP_AVATAR_THUMB_WIDTH;
    $jfb_suffix = 'n';
    }
    $avatar = '<fb:profile-pic uid="'.$user_info->facebook_uid.'" facebook-logo="true" size="'.$jfb_size.'" width="'.$jfb_size.'" linked="true" class="avatar"></fb:profile-pic>';
    return $avatar;

    } else {
    return $avatar;
    }

    }
    add_filter( 'bp_core_fetch_avatar', 'bp_jfb_get_avatar',10,4);

    This code should go in a bp-custom.php file and uploaded to the mu-plugins directory.


    joshmac
    Participant

    @parkstreet


    techguy
    Participant

    @crashutah

    So, basically to resolve your problem your fetching the avatar from Facebook each time it’s loaded? Seems like you should be able to download the avatar the first time from Facebook and save it to BP, no? Maybe Facebook doesn’t allow you to download it and then upload it to BP?

    Just seems pretty expensive to have to query Facebook every time to get a person’s avatar. The nice part is that the avatar will continue to update as they change it on Facebook. The bad part is that if Facebook’s down, then they’ll have no avatar. You’d also be using a lot of your Facebook Connect connections to load avatars once your site scales to any size. I think they have a limit on connections, no?


    joshmac
    Participant

    @parkstreet

    Don’t know. There should be a way to cache the avatars. But someone else will need to take the code above, extend it, and make it more usable. I am just supplying a basis to build on. As for now, if the facebook profile pic is not available, it will default to the silhouette.

Viewing 16 replies - 1 through 16 (of 16 total)
  • The topic ‘WP-FB connect profile.’ is closed to new replies.
Skip to toolbar