如何使用facebook og属性进行会话和重定向

I would like to share a page with image on facebook. I used below code and it is working perfectly fine for static images.

<html xmlns="http://www.w3.org/1999/xhtml"
  xmlns:og="http://ogp.me/ns#"
  xmlns:fb="https://www.facebook.com/2008/fbml">

<head>
<title>MyExample</title>
<meta property="fb:app_id" content="xxxxxxxxxxxxx" />
<meta property="og:title" content="This is my example"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="http://mywebsite.com/mypage.php"/>
<meta property="og:image" content="http://mywebsite.com/images/myimage.jpg"/>
<meta property="og:site_name" content="Mywebsite"/>
</head>

<body>
</body>

</html>

The image name I am passing here is static one. How I can provide dynamic image to this page? Can I use php session? How? Also, if anyone clicks on my post, I would like to redirect user to another url. How I can do that?

pass the dynamic data form your controller to view and print that data in your meta properties