I'm just getting into the Open Graph protocol, and I've encountered a problem. On my app, users can add titles of books they like. Other users can click: "read this book", and on there feed appears: "[name] is reading a book on [myapp]", en beneath that there's [book image], [book title] and [book description].
I'm setting up the open-graph-thingy, but the problem is that when I change the book title/image/description (manually) and I click "read book", it displays the old information. Facebook probably caches this data in the meta-tags. When my app is finished, the title/image/description in the metatags will be populated via a php script, off course.
This is unwanted behaviour, because when someone publishes a new book, and someone else clicks "read that book" after he read another book, it will still look like he's reading the first book...
I'm really suprised to see this happening, because listening to songs on spotify must (essentially) be the same thing, right?
I've read on the internet to add
fbrefresh=
to the url, but how does this work and is this the ideally way to handle this?
Thanks a lot!
because when someone publishes a new book, and someone else clicks "read that book" after he read another book, it will still look like he's reading the first book...
That sounds like you are using only one object for your book, and change the values of the object all the time …? If so: This is not how it works, you have to create an object for every book, and then publish your read action on one of those specific objects each time.
(Objects are referenced through their URL in Open Graph, so it can also be a URL containing GET parameters, f.e. only a book id that you then use server-side to read the relevant meta data to output from a database.)