Friday, September 4, 2009

how to share on Facebook

The URL format is as follows (giving the example of CNN.com, wrapping for ease of viewing):

http://www.facebook.com/sharer.php
?u=http%3A%2F%2Fwww.cnn.com%2F
&t=CNN%26s+website

The parameters are "u", which gives the URL of the page (encoded, of course), and "t", which gives the default title of the link (also encoded). So this particular example could be used to let somebody create a "Share" on Facebook, with the URL "http://www.cnn.com/" and the default title "CNN’s website".

If you try to follow that link, you’ll see that it actually suggests the title "CNN.com - Breaking News, U.S., World, Weather, Entertainment & Video News". This is because it was able to successfully retrieve the URL, and it used the title from that page. If Facebook is unable to reach the page, then it will use the "t" parameter instead. So you’ll probably want to provide a "t" just in case there is a network problem when Facebook tries to connect.

see the link for more details
http://www.facebook.com/share_partners.php

No comments:

Post a Comment