facebook share button with custom title, description, and image [duplicate]
Possible Duplicate:
How does Facebook Sharer select Images?
It looks like that the Facebook support custom title, description, and thumbnail in several ways.
So far, I have found two solutions.
using meta tag
[meta name="title" content="title" /] [meta name="description" content="description" /]
using URL parameters.
[a href='http://www.facebook.com/sharer.php?s=100&p[title]=WEB1CHANNEL&p[summary]=Web+Design+Company+in+Dubai.&p[url]=http://www.webchannel.ae&p[images][0]=http://qacode.com/test.jpg']asdfa[/a]
I really like solution #2, but it looks like it is not stable. Sometimes it works, sometimes it does not. Overall, it works anyway.
Is it okay to use solution #2? Is it going to be available in the future?
- Use Open-Graph Meta Tags to let Facebook get the data you want when scraping the page.
- Facebook will not respect the parameters you pass to
sharer.php
instead it'll try to get the info from the page. - The Like plugin is the way to go and if you really don't have a good reason to use sharer...don't use it!
- Check your URL against the Facebook Debbuger to better test your links.
As for as I have seen solution number 2 is not stable. I have seen many problems related to solution 2 in facebook as well as in this forum too. I have personally experienced that it is better to use meta tags with xfbml version of fb:share.
<fb:share-button type="button_count" href="http://<?php echo($_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']);?>"></fb:share-button>It doesn't stop working in my experience.
精彩评论