0
votes

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..?

2
Can i change the page meta data ie title and description ?Abhay Dwivedi
Now i am using : facebook.com/sharer/… Its working fine but image is not displaying. Why?Abhay Dwivedi

2 Answers

1
votes

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" />
0
votes

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 />