开发者

facebook api, how to change the name of the category when u like something?

开发者 https://www.devze.com 2023-03-13 23:23 出处:网络
i am trying to add a like button on my webpage and when i like something in facebook appears under Website category. I would like to change that. Any Ideas?

i am trying to add a like button on my webpage and when i like something in facebook appears under Website category. I would like to change that. Any Ideas?

here is my fb like button:

<div id="fb-root"></div><script src="http://connect.facebook.net/en_US/all.js#appId=app id here&amp;xfbml=1">&开发者_如何学JAVAlt;/script><fb:like href="http://www.xxx.com" ref="casting" send="false" layout="button_count" width="100" show_faces="false" font="arial"></fb:like>

thanks


Define the og:type meta property on your page. You can find available options here. For example:

<meta property="og:type" content="athlete" />

Note that the meta data will have to be defined in the <head> portion of your site (as all meta tags should) or Facebook will ignore it.

You might want to look into the open graph protocol to see some other stuff you can define for the "likes".

Additionally note that editing the og:type on a page which has received more than 10,000 likes will not be changed anymore as they have become fixed at that point.

As fijter noted below, Facebook looks for this meta data from the url which is used for the like button. If you have a like button with an url which you can't control, you won't be able to modify the meta data associated with it.

If your page has been liked already (but less than 10,000 times) and you change your meta data, run the Facebook URL linter tool to have Facebook refetch the meta data from your site.

0

精彩评论

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