Search code examples
facebook-likefacebook-opengraph

Facebook Like a particular photo on a page


Context:

I have a photography driven site: http://www.camphuawni.com/about-us/activities, and "photo tools" by each photo. You can Pin, Tweet, Like, or +1 each photo using an AddThis widget. The link that is generated for each image is the current URL+the anchor of the photo (so you can literally link to a particular photo) Here's an example http://www.camphuawni.com/about-us/typical-day-at-camp#activities-for-kids-what-makes-huawni-unique.

Question:

I want to be able to "Like" a particular photo on a page and force THAT photo to show up as the thumbnail, along with the title and caption for that particular image. Almost as if we had OpenGraph tags for each photo.

I want to link to a page at a specific spot, and tell Facebook to show the image title, caption, and thumbnail (instead of the entire page's respective data).

What kinds of programming structures or tools should I use to feed the like buttons to do this?


Solution

  • You need to create a page for each image with the appropriate open graph data for that image and use that URL in the like button.

    If you want visitors to show up on the gallery page if they click through, add a javascript redirect and include a link for any browsers who may have javascript turned off.