Link to home
Start Free TrialLog in
Avatar of adrian7474
adrian7474Flag for United States of America

asked on

Facebook’s Attached Links and Page Previews not working on wordpress blog

I need help resolving something. I have a wordpress blog (cannot list) that when you paste a link from an article into facebook it pulls the main sites description, image, NOT the post articles. It does pull the proper title and permalink, but NOT the description and image.
Here is what i got so far, basically, I need to know how use wordpress codex to pull the description and image from a particular post. Here is what i got so far which is in the header.php file of my wordpress theme
<meta property="og:type" content="article" />
<meta property="og:title" content="<?php the_title() ?>"/>
<meta property="og:url" content="<?php  the_permalink() ?>" />
<meta property="og:description" content="<?php echo urlencode(get_permalink()); ?>"/>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of adrian7474
adrian7474
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial