Abhay Dwivedi
Abhay Dwivedi

Reputation: 15

Hot to change title and description when share in facebook

I have no of products and want to share them in facebook with different title and description. But when i share my page, it takes data from my page meta tags. How can i change title and description dynamically to be shared..?

Upvotes: 0

Views: 3262

Answers (2)

szenbalu
szenbalu

Reputation: 193

You can read more about Open Graph.

With this tool you can see what will be your title and description: Linter

It's good to know, once Facebook cached your data, you can't overwrite it until it's cached again.

Maybe you can use this form:

<script>
var your_desc = item.desc;
</script>
<meta property="og:description" content=your_desc />

Upvotes: 0

Tom Walters
Tom Walters

Reputation: 15616

The following meta tags will allow you to control what Facebook picks up:

<meta property="og:title" content="" />
<meta property="og:description" content="" />
<meta property="og:url" content="" />
<meta property="og:image" content="" />
<meta property="og:type" content="article" />

Upvotes: 1

Related Questions