I have an app that encourages people to refer their friends by sharing the page on Facebook. When they click our share link, they are actually sharing example.com/?ref=REFCODE, where REFCODE is a unique string identifying them. Their total referrals are tracked via how many people sign up after visiting example.com/?ref=REFCODE.
The og data is set universally and I would like to update it for every REFCODE. However, Facebook seems to store the scraped data separately for every refcode.
Facebook's debugger only allows me to manually rescrape 20 URLs per hour.
I've tried passing a random additional variable at the end of the query string to make Facebook think it's a new URL, but it doesn't seem to have any effect. (Example: passing example.com/?ref=REFCODE&f=g rather than the original URL.)
I'm aware of the method found here, but I'm not sure how I would apply it to a large set of URLs at once: Is there an API to force Facebook to scrape a page again?
Is there any good way to do this?
Update: Thanks to Igy for leading me to one effective solution, a simple shell script loop. I also should have mentioned that the way I was passing the URL to Facebook was via sharer.php. It turns out that the random additional parameter trick wasn't working because I wasn't encoding my own URL, see the answer I just added for details on both methods.