WordPress.org

Ready to get started?Download WordPress

Forums

WP LinkedIn
[resolved] Recommendations Image (6 posts)

  1. J
    Member
    Posted 6 months ago #

    Hi,

    Great plugin Ive used this plugin for 2 years now and haveand issue after an upgrade. I edited the reccomendation.php file with :-

    <img class="picture" src="<?php echo $recommendation->recommender->pictureUrl; ?>" />

    which used the pull in the image fine, I notice the api has changed a little and used the following :-

    <img class="picture" src="<?php echo $recommendation->recommender->picture-url; ?>" />

    Is there any reason why this isnt pulling the persons profile image in anymore?

    Thanks again for the plugin great work!

    https://wordpress.org/plugins/wp-linkedin/

  2. Claude Vedovini
    Member
    Plugin Author

    Posted 6 months ago #

    the API didn't change and picture-url is not a valid PHP identifier so you probably have a PHP error at this point

  3. J
    Member
    Posted 6 months ago #

    Thanks for your reply Claude.

    Is there any reason why $recommendation->recommender->pictureUrl; would have stopped then? There doesnt seem to be a PHP error it is pulling all the other details in fine on the site just not the image.

    Many thanks
    Jamie

  4. Claude Vedovini
    Member
    Plugin Author

    Posted 6 months ago #

    it never pulls any image or is it just for some profiles? some profiles don't have public pictures available

  5. J
    Member
    Posted 6 months ago #

    Hi Claude,

    I used a support post as suggested by inserting code in the wp-config to pull in the 'picture-url' field from linkedin :-

    define('LINKEDIN_FIELDS_RECOMMENDATIONS', 'recommendations-received:(recommendation-text, recommender:(first-name, last-name, public-profile-url, headline, picture-url))');

    then placed this in recommendations.php file :-

    <img class="picture" src="<?php echo $recommendation->recommender->pictureUrl; ?>" />

    And its pulling in the recommenders profile image fine. Thanks for the help.

    Hope this helps others
    Cheers
    J

  6. Claude Vedovini
    Member
    Plugin Author

    Posted 6 months ago #

    good :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.