We help IT Professionals succeed at work.
Get Started

dynamically setting facebook meta tags in asp.net page

kevinvw1 asked
Last Modified: 2012-08-13
I have a web page that let's a user pick a video and then plays the video.
It is similar to YouTube.  
After the user has picked a video they can later reference the video with the URL.
The URL would be something like this - http://www.mywebsite.com/videos?v=123
Where "123" is the id of the video they wish to play.
I am setting meta tag content dynamically on page load using asp.net.
If I view the page -  http://www.mywebsite.com/videos?v=123 I can see that the facebook metatags have been properly rendered.
All the proper facebook opengraph tags are there including "og:image" and that tag resolves to a jpg image on my server.
When I paste the above link in to facebook it does not pull the image in to the facebook post.
However if I hard-code the og:image meta tag in to the page then the preview image will display in the facebook post.

My question is, do the dynamic meta tags actually get rendered when facebook reads the URL?  I currently have the code in the page_load event of the asp.net page.  

Any help would be greatly appreciated.

Thanks,  Kevin.
Watch Question
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE