开发者

Facebook share with AJAX meta tags

This page, when put in Facebook status textbox, grabs t开发者_C百科he thumbnail, description and page title with my name and thumbnail into the Facebook Sharer textbox:

https://twitter.com/#!/ftwolf

However, it is obviously an AJAX-loaded page (as you can tell by the hash fragment URL). How can I accomplish the same thing on a page that loads via AJAX?


You can use jQuery (Twitter users jquery, too, probably) and its plugin address. It has very simple implemention

        $.address.init(function(event) {
            // Initializes plugin support for links
            $('a:not([href^=http])').address();
        }).change(function(event) {
            //do your stuff
        });


The Facebook crawler should work the same way as google's.

You can test your implementation with the Facebook linter

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜