Has anyone managed to create
their own Facebook icon and hook
it up to ModX? I’m not talking about the off-the-shelf FB button or
the iFrame versions but your own graphic pulled from your own server.
I have my own Facebook button under each blog post.
I’d like people to click on it and for Facebook to know
which page URL you are sharing.
I know I could do this by using the
[[!++site_url]][[~[[*id]]]]
in the code somewhere but I can only get it to work when I hardwire a
single URL into the code. That’s not really what I want as the code is
a snippet.
My code is below (I’ve omitted the actual URLs)
<a href="
http://www.facebook.com/sharer.php?u=http://www.mybigfatdomain.com/blog/recent-updates.php/&t=Our+Blog" title="Share on Facebook" rel="nofollow" target="_blank"><img src="../assets/images/button_facebook.gif" alt="Facebook" /></a>
I know the part of the above code which refers to the domain
http://www.mybigfatdomain.com/blog/recent-updates.php
could be replaced by something more elegant but nothing I have tried really works.
Would appreciate any help.