Forums

Custom share button for LinkedIn (2 posts)

  1. jonjensen
    Member
    Posted 2 months ago #

    I have a box with buttons at the footer of all my posts to share (http://jonjensen.com/blog/?p=1487 for example). All the buttons work, but I can't figure how to automatically generate the URL, blog title, and a first paragraph in the PHP.

    LinkedIn says this is possible: http://www.linkedin.com/static?key=developers_widget_shareonlinkedin

    Anyone know what code I can put in to auto-generate the meta data?

    Seriously stumped.

  2. codybuell
    Member
    Posted 2 months ago #

    Yep, here is one possibility for your link:

    <a href="http://www.linkedin.com/shareArticle?mini=true&url=<?php the_permalink() ?>&title=<?php the_title(); ?>&summary=&source=<?php bloginfo('name'); ?>" target="_new">

Reply

You must log in to post.

About this Topic