Reputation: 1610
Consider a page with many posts as:
Page A
- post 1
- post 2
- post 3
- ...
Is it possible to add a Like button for each post (1, 2, 3, ...) and when a user "Like" one of them, send/share the information of that post on Facebook?
For each post I wan to share the title, description, photo, ...
I can't use Open Graph meta data because it's page related, right?
Thank you for you answers, I'm stuck.
Upvotes: 0
Views: 1027
Reputation: 2156
Sure, just make the like button URL something like http://www.yourblog.com/pages/A?title=post1&description=blah&image=baz.png
Then in your site/blog you need to take the query data from the URL and add that into your meta data dynamically*, i.e.
<meta type="og:title" content={GET['title']} />
<meta type="og:description" content={GET['description']} />
<meta type="og:image" content={GET['image']} />
(this is pseudo code)
*Technically you only need to do this when the User Agent is the Facebook scraper, but you may as well do it always unless there's a strong reason not to. See https://developers.facebook.com/docs/opengraphprotocol/ for more information.
Upvotes: 1
Reputation: 11852
As long as each post has its own unique URL with Facebook metadata on it, yes you can.
Each like button has to have a reference to the respective page.
Upvotes: 1