Take the 2-minute tour ×

I have this code for a Facebook custom share button:

function fbs_click() {
return false;
<img src="../../../../../image/photography/pics/fb-share.png" alt="Share this!" width="57" height="21" border="0">

This is supposed to scrape info from the page but for some reason it doesn't and it gets redirected to the site's main index.html.

I've tried adding facebook og tags and the extra code in the but to no avail.

Any thoughts?

EDIT: Having been told that the share function has been deprecated, I tried to do this with the feed dialog:

<a href="https://www.facebook.com/dialog/feed?link=http://www.travel2italy.com/Travel/Italy/Company/photography/index.html&picture=http://www.travel2italy.com/image/photography/pics/homepage/florence1-home.jpg&name=travel2italy.com&caption=Photo%20Gallery&description=A%20Beautiful%20photo%20of%20Florence&redirect_uri=http://www.travelive.com" target="_blank">
<img src="../../../../../image/photography/pics/fb-share.png" alt="Tweet this!" width="57" height="21" border="0">

but when i click on the link it takes me to facebook and says an error occured, wth?!:(


I wasn't aware that the app_id argument is needed, signed up for an app and it works now, but it strips away the #section I have at the end of the link (i want it to link to a specific slide in a slideshow)


Now some of the share buttons using the sharer do seem to work but don't pull all the photos off the page for me to choose the one i want, this is insane-o, could it just be a caching issue?

share|improve this question
You shouldn't be using sharer.php anymore, it's been deprecated for a very long time now. Suggest you use the like button, which also allows users to share a message together with the link :) –  Claudiu Sep 4 '12 at 11:07
the issue here is that i need to have a custom button, can i do that with the like button? –  Ioannis Aliazis Sep 4 '12 at 11:09
The just use the Feed dialog, developers.facebook.com/docs/reference/dialogs/feed –  CBroe Sep 4 '12 at 11:49
@CBroe tried it, see edit above –  Ioannis Aliazis Sep 4 '12 at 12:14
With all Facebook dialogs, you can add the parameter show_error=1 to get more info about what went wrong. So: facebook.com/dialog/feed?show_error=1&link=http://… –  CBroe Sep 4 '12 at 12:27

Your Answer



Browse other questions tagged or ask your own question.