Tuesday, June 8, 2010

facebook like button Application

There is two way you can use this like button application to your own website
one is useThe basic Like button is available via a simple iframe you can drop into your page easily.

address:
http://developers.facebook.com/docs/reference/plugins/like
and the picture is as below
And the second way is use facebook XFBML tag (which requires you use the new JavaScript SDK).

The JavaScript SDK enables you to access all of the features of the Graph API via JavaScript, and it provides a rich set of client-side functionality for authentication and sharing. The JavaScript SDK is also necessary to use the XFBML versions of the Social Plugins. To use the JavaScript SDK, you must register your application. Make sure your Base Domain is set to the base URL of the site where your application will reside.

So,first,register you application as the below address:http://developers.facebook.com/setup/,make sure your site url is the format:http://www.xxx.com/


When you finish,you''ll get your site App URL and App ID

Use the following code insert to your site,and it can auto get your url



And this is the sample setup,
To customize how your site shows up when users share your page with the Like button, you can add meta data to your web pages:
  • og:title - The title of your page; if not specified, the title element will be used.
  • og:site_name - The name of your web site, e.g., "CNN" or "IMDb".
  • og:image - The URL of the best picture for this page. The image must be at least 50px by 50px and have a maximum aspect ratio of 3:1.
YOU CAN VIEW THE FACEBOOK FOR WEBSITE DEVELOPERS :http://developers.facebook.com/docs/reference/plugins/like




No comments:

Post a Comment