I'm trying Facebook open graph, and I want to assign og:description dynamically when a user share my page, and it's determined by my php.
<meta name="og:title" content="test1" />
<meta name="og:description" content="<?php echo $_REQUEST['parm'] ?>" />
<meta name="og:image" content="http://nuphoto.com.tw/titleapp4.png" />
<meta name="og:url" content="http://nuphoto.com.tw/share/easygo_bruce.php" />
However, it always caches the previous result, and it doesn't change. I googled the solution , but all of them didn't work. Here're my trials.
Go to https://developers.facebook.com/tools/debug and enter my url. it works, but I need to change my page dynamically. so it's not suitable for me.
Follow How to update facebook open graph image
$.post( 'https://graph.facebook.com', { id: 'http://www.example.com/my/share/url/', scrape: true }, function(response){ console.log(response); });
it didn't work, and showed error.
FB.getLoginStatus() called before calling FB.init(). all.js:53 Object {url: "http://example.com/mytest.php", type: "website", title: "test, image: Array[1], description: "XXX"…}
- Someone said add
v=XXX&fbrefresh=XXX
may help, but it still fails for me.
https://www.facebook.com/sharer/sharer.php?u=example.com&fbrefresh&v=xxxx
- Someone said add
Please help me , I already spent hours of work....