开发者

Can I make a change to my website to nominate an image to be used by facebook? [duplicate]

This question already has answers here: Closed 11 years ago.

Possible Du开发者_运维技巧plicate:

How does Facebook Sharer select Images?

I've added a facebook "like" button on my site (I know, pretty sad).

However, my main logo is just text (styled with @font-face) which, I think, is a good thing since it's small and more accessible etc.

When someone clicks "like" and chooses to post this action to their wall, the only image facebook finds is a twitter icon. Is there some way I can trick facebook into using a different image as the default image for my site. I've tried adding an image but using CSS to not display it, but it didn't work.

Any other ideas?

Update: opengraph looks like the way to go. However I tried it and it still isn't picking up my icon. Can you spot any mistakes in my meta tags? stolencamerafinder.com

Solved: opengraph works fine. (If data is stale, use facebook's linter to update their cache)


add this meta tag

<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

more here https://developers.facebook.com/docs/opengraph/


Go here for more description

You can call this function rather than share and customize your share. You have to use Fb init with it.

function post_to_fb() {
    FB.ui({
        method: 'feed',
        name: 'share',
        link: 'share link',
        caption: 'caption',
        description: description,
        picture: 'image link',
        message: ' text'
    }, function(response) {
        if (response && response.post_id) {
        }
        else {
        }
    });
}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜