Flatliner
Flatliner

Reputation: 1

The title of shared links displayed as urls

When I share new blogposts, sometimes the title of the post displays properly, and sometimes it is only displayed as an url. The posts are based on the exact same template, and i can find no differences in the code between the titles that work and ones that dont. All posts display the correct title when viewed in a browser window, and the facebook debugger finds the title for all the posts. however, i do recieve a warning about required property missing, og:title is required. same for type, image and url in the debugger

everything but the title displays properly when sharing links. Can anyone help with this? Thanks..

Upvotes: 0

Views: 270

Answers (1)

vitalikaz
vitalikaz

Reputation: 578

Can you show your code? Do you use OpenGraph meta tags? You can define exact title, description, image etc. to show in facebook using these tags.

<head>
<title>Page title</title>
<meta property="og:title" content="Page title to show in Facebook"/>
<meta property="og:type" content="article"/>
<meta property="og:url" content="http://www.your.page.url.com/"/>
<meta property="og:image" content="http://path.to.your/image.jpg"/>
<meta property="og:description" content="Page description"/>
</head>

More here: http://developers.facebook.com/docs/opengraph/

Do not forget to add OpenGraph protocol support to your page:

<html xmlns:og="http://ogp.me/ns#">
....
</html>

Upvotes: 2

Related Questions