FBML - How to Add a Share Button to Your Facebook Fan Page

103 22
FBML provides the code to include a little share button, like the ones you see on the bottom right of the wall, on your customized fan or business page.
When you are on any tab other than the wall, there isn't a share button, so it's useful to be able to add one so that visitors can share the page with their friends or even post your page to their own wall.
And this little bit of FBML is super easy to use.
Unfortunately, the button can not be customized.
It's going to look just like that.
But, it can be added.
The code is:
< fb:share-button href="/links/?u=url to your Facebook page" />
The only thing that you need to change is the the url after http:// If you want to make the share box a little fancier you would use the fbml that includes the meta class rather than the url class.
With the meta class you can specify the image that is displayed rather than using the default logo and include a description that contains more information about the content of your page.
  • meta name="title" content=""name of fan page" - the name
  • meta name="description" content="description of fan page" - the description you want to use.
  • link rel="image_src" href="/links/?u=url to image location" - if you are using an alternative image, this would be the location on your server
  • link rel="target_url" href="/links/?u=url to your Facebook fan page" - the URL that you are sharing
The message box when using the meta class looks like the following.
You can see that a different logo is being used and that the description that I specified is providing more detailed information about the page.
Just one more little thing you can do with FBML on your fan page.
Source...
Subscribe to our newsletter
Sign up here to get the latest news, updates and special offers delivered directly to your inbox.
You can unsubscribe at any time

Leave A Reply

Your email address will not be published.