WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Gallery
OpenGraph API on ImageBrowser pages (8 posts)

  1. gamue
    Member
    Posted 3 years ago #

    Hi,
    I'm using NextGen 1.8, have made some custom template and use the image browser, so i have one picture per page (some kind of detail page).

    On this page I want to display a facebook-like button for each of them, which was tricky but is working now. To make this even better I want to integrate the OpenGraph API on those detail pages (for preview image and better description). Unfortunately the image is only available in the imagebrowser.php and not in the header.php or is there a way to use the wp_head-hook?

    To use the API it's necessary to add some tags in the <head>, that's all (I hope).
    Describtion of the API: http://developers.facebook.com/docs/opengraph/
    Can be tested with this one: http://developers.facebook.com/tools/lint

    http://wordpress.org/extend/plugins/nextgen-gallery/

  2. halluzineyt
    Member
    Posted 2 years ago #

    Hello Can you share how did you fixed this?

  3. gamue
    Member
    Posted 2 years ago #

    Hey,
    I've created a small plugin which does the things I wanted, if you want to have a look at it, you'll find it here: http://gamue.de/nxgOpenGraph.zip

    I also submitted the code to the core development so it will maybe find it's way into a future release. If not and there's some demand I will make a "real" plugin out of it.

  4. 2broken2
    Member
    Posted 2 years ago #

    Gamue, could please explain how to use facebook social plugins for every single image in nextgen gallery imagebrowser?

    For now i managed to put fb comments form here but it works for all images in nextgen gallery, not for every single image seperately as i want.

    i want to put seperate fb like button and comments widget under every image. is there any way to do this?

    Thank you so very much in advance!

  5. gamue
    Member
    Posted 2 years ago #

    Hey, I have used a simple version for the like-buttons. YOu find a way how to build the iFrame-Like-URL all over the net.
    besides that it's needed to have a correct canonical url or none in the html header. by default the one which is generated from the yoast-seo-plugin isn't correct, so I removed the corresponding code in the plugin, which isn't update friendly :(
    this changed make it possible to "like" every image in the image browser.

    In addition to that i wrote a small plugin which injects some facebook-tags into the html-header of the page so facebooks gets a name, preview image and description I want if someone presses "like".

  6. robolist
    Member
    Posted 2 years ago #


  7. evilmc
    Member
    Posted 2 years ago #

    @gamue,

    can you copy your code for facebook like button on this topic?

  8. evilmc
    Member
    Posted 2 years ago #

    and can you upload this plugin for facebook-tags?

    ''In addition to that i wrote a small plugin which injects some facebook-tags into the html-header of the page so facebooks gets a name, preview image and description I want if someone presses "like". ''

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.