サポート » プラグイン » prettyphoto で 各画像毎にfacebookのlikeボタンを設置

  • お忙しい中ご質問させていただきます。

    現在 WordPress3.3.2 で PrettyPhotoを使用しております。
    画像を拡大した時にFacebookのLikeボタンを設置(これはデフォルトでついていました)
    したのですが、1つのLikeボタンを押し自分のFacebookページでみると
    各画像ではなくそのページにLikeした事になってしまいます。
    各画像毎にLikeさせたいのです。

    OGPを設定し
    Facebookデバッカー http://developers.facebook.com/tools/debug で確認したところ
    og:urlhttp://○○.com/photo(photo→ページ名です)迄しか
    認識しておらず、もしかしたらこれが原因なのではないかと思いました。

    画像拡大時のurlは
    http://○○.com/photo/#prettyPhoto%5Bset_5%5D/1/
    なので、
    これを og:url に認識させるにはどのようにしたら良いのでしょうか?

    現在の メタタグは
    <meta property=”og:url” content=”<?php echo get_permalink(); ?>” />
    です。
    PrettyPhoto.jsのハッシュタグは
    function getHashtag(){
    url = location.href;
    hashtag = (url.indexOf(‘#prettyPhoto’) !== -1) ? decodeURI(url.substring(url.indexOf(‘#prettyPhoto’)+1,url.length)) : false;

    return hashtag;
    };

    function setHashtag(){
    if(typeof theRel == ‘undefined’) return; // theRel is set on normal calls, it’s impossible to deeplink using the API
    location.hash = theRel + ‘/’+rel_index+’/’;
    };

    function clearHashtag(){
    if ( location.href.indexOf(‘#prettyPhoto’) !== -1 ) location.hash = “prettyPhoto”;
    }

    function getParam(name,url){
    name = name.replace(/[\[]/,”\\\[“).replace(/[\]]/,”\\\]”);
    var regexS = “[\\?&]”+name+”=([^&#]*)”;
    var regex = new RegExp( regexS );
    var results = regex.exec( url );
    return ( results == null ) ? “” : results[1];
    }

    多分ここらへんで設定されている気がするのですが…、
    全くの知識不足でほんとうに申し訳けないです。
    もし、どなたかおわかりの方 どうぞ宜しくお願い致します。
    また、不足がございましたらご指摘もお願い致します。

  • トピック「prettyphoto で 各画像毎にfacebookのlikeボタンを設置」には新たに返信することはできません。