tags:

views:

1155

answers:

2

I am trying to create a share button for links using the Facebook share button:

http://www.facebook.com/facebook-widgets/share.php http://wiki.developers.facebook.com/index.php/Facebook_Share

However when I try to use the t value in my URL's they don't work.

I even tried using the example on the API page:

http://www.facebook.com/sharer.php?u=http%3A%2F%2Fdevelopers.facebook.com%2F&t=Facebook%20Developers

And it doesn't work... It sets the title as developers.facebook.com not Facebook Developers as specified by the URL

Anyone know how I can make this work correctly?

I want my share links to come up as... 'Title Of what I am sharing' and then... the url directly to that item.

+3  A: 

The Facebook share link dynamically fetches the title and images from the page/website to share. The title specified in the link is only used while Facebook loads the page details. Check this link out:

http://www.facebook.com/sharer.php?u=http%3A//www.rackspace.com&t=SOME%20TITLE

pygorex1
Yea so what the ____ is the point of having the t value then? When I make URLS it pops up with my title then changes it... Is my only solution to make dynamic titles for those specific links I suppose? So when facebook loads the page details from that URL it gets that `<title>` I want?
ian
Also when use something like `u=http://www.mysite.com` the facebook share page loads up `My Site Title` then after thinking for a moment changes it to `www.mysite.com`
ian
Yup, that's the way Facebook does it. Not sure why. Is it your site? You could change the title or create a page with the title you want that then redirects to the page you want.
pygorex1
Even when I have tried making dynamic titles for my site for Facebook to detect it fails and reverts to www.site.com as the title.
ian
A: 

do you encode your url with encodeurl function

Sarfraz
I sure do. Do out think it's some type of encoding problem?
ian
It's not an encoding problem, I have this too and the url is formatted correctly.
stealthcopter

related questions