WordPress.org

Support

Support » Plugins and Hacks » User Photo » Image through facebook is not showing.

Image through facebook is not showing.

  • I am using facebook all plugin and user-photo plugin for front end upload.
    The facebook all plugin piks the profile picture from the facebook. but in my edit profile page i am using userphoto_thumbnail($current_user->id) this code for getting uploaded image. how to check if the facebook user image is there and display that image in the edit profile page. means facebook logged In user have the facebook image and how i will display that image with a if condition in this else default image must shown is it possible?

    if(userphoto_exists($current_user))
        userphoto($current_user->id);
    elseif
        //facebook image
    elseif
        //default image

    https://wordpress.org/plugins/user-photo/

Viewing 1 replies (of 1 total)
  • I would like to share the code that i did for a solution for the above question
    $fb_image = $wpdb->get_var("SELECT meta_value FROM $wpdb->usermeta WHEREuser_id= '".$current_user->id."' ANDmeta_key`=’facebookall_user_thumbnail'”);
    $fb_img = ‘<img src=”‘.$fb_image.'” height=”128″ width=”128″ alt=””>’;
    if(userphoto_exists($current_user)){
    userphoto($current_user->id);
    }
    elseif($fb_image!=””) {
    echo $fb_img;
    }
    else{
    echo get_avatar($user->ID, 96);
    }`

Viewing 1 replies (of 1 total)
  • The topic ‘Image through facebook is not showing.’ is closed to new replies.
Skip to toolbar