Problem in adding Facebook Like Button - facebook

My URL is something like www.example.com/product/?mid=1&pid=B0019DVLN2
If I add this url to the like button it takes only www.example.com/product/?mid=1 and leaves the rest part of the URL.
I tried using the facebook lint tool. The problem still didnt get solved.
I tried replacing & with & also, but still the problem remains.
Thanks,

The solution is to replace & with %26

Just tested this out.. worked fine for me:
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.example.com%2Fproduct%2F%3Fmid%3D1%26pid%3DB0019DVLN2&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:80px;" allowTransparency="true"></iframe>
Built link here:
fbook link

Related

Like Button doesn't work when I return on the link?

Ok, this is the iframe I get from official API
<iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.gabbatracklistworld.com%2Findex.php%3Fexplore%3Dview%26trackid%3D586&send=false&layout=button_count&width=450&show_faces=false&font&colorscheme=light&action=like&height=21&appId=225322387567317" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:21px;" allowTransparency="true"></iframe>
it works well! I click Like, and I see on facebook that I LIKE that page. BUT, when I click from Facebook to the link, going to that page :
http://www.gabbatracklistworld.com/index.php?explore=view&trackid=586&fb_action_ids=10200316597536577&fb_action_types=og.likes&fb_source=timeline_og&action_object_map=%7B%2210200316597536577%22%3A10151528903177923%7D&action_type_map=%7B%2210200316597536577%22%3A%22og.likes%22%7D&action_ref_map=%5B%5D
I see that "I don't like it" anymore. Seems that querystring added by Facebook is another location than previous page.
Is it a bug? How can I fix it?
If you go to http://developers.facebook.com/docs/reference/plugins/like/
and paste http://www.gabbatracklistworld.com/index.php?explore=view&trackid=586
and then press get code. You'll see a tab called iframe. It says:
This plugin does not have an iframe implementation with the selected
options. Please use the JavaScript SDK and the HTML5 or XFBML
implementations, or change the value of the send parameter.
You need to use the first implementation, embed the javascript sdk, and create the like button using html5 or xfbml. The tabs explain exactly how.

Facebook like button not working on custom post type in wordpress

I'm having trouble getting the facebook like button to work on custom post types in wordpress.
The code I'm using:
<iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo urlencode(get_permalink($post->ID)); ?>&layout=button_count&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:25px"></iframe>
It registers the like on the site, but nothing updates on facebook.
Not sure what the problem is, think it may have something to do with the permalink, but everything I've tried doesn't work.
Any help appreciated!
2 Best Plugins are available for facebook like for custom post type
Facebook Like Buttton
Another good plugin for facebook like
You just have to: download it --> install it --> select type(POST) --> where to display (bottom of post)
OR if you interested for custom Facebook like "code" then Go here.
I hope this will help you out! :)

Facebook like issue (disappears on refresh)

I have a facebook app that load some content with ajax, including some like buttons implemented with iframe.
While everything seems ok and in my pc is working properly, in my clients pc it does not work and the json response of 'like' is : 307 temporary redirect.
At first i thought that it must have been a firewall issue so i proposed my client to test another application that has 'like' button. Unfortunately, everything was ok in the other app.
The thing that puzzles me is that the structure of the iframe is identical:
mine:
<iframe scrolling="no" frameborder="0" src="http://www.facebook.com/plugins/like.php?href=http://www.chivastimeforfriends.com/single.php?fb_ref=4f15a6ed73f3a&layout=button_count&show_faces=false&width=150&action=like&font=trebuchet+ms&colorscheme=light&height=21" style="border:none; overflow:hidden; width:150px; height:23px;" allowtransparency="true"><iframe>
other app
<iframe scrolling="no" frameborder="0" allowtransparency="true" style="border:none; overflow:hidden; width:150px; height:80px;" src="http://www.facebook.com/plugins/like.php?href=http://www.stolichnaya.gr/stoli/fb/outletitem.php?outid=12&layout=button_count&show_faces=false&width=150&action=like&font=trebuchet+ms&colorscheme=light&height=21"></iframe>
Facebook debugger does not show any problem in my app. The other app has not even meta tags.
The only difference is that while the other app json response is returned in just 2 seconds , in my app takes about 13 second. Has this anything to do with the problem?
Any ideas?
Thanks
You need to url_encode the href you send to facebook. You cannot have another ? sign:
...like.php?href=http://www.stolichnaya.gr/stoli/fb/outletitem.php**?**outid=12&...
You could use the PHP function url_encode.
http://php.net/manual/en/function.urlencode.php
<?php
echo '<a href="mycgi?foo=', urlencode($userinput), '">';
?>

embeding a facebook 'like' button

I Know this is super simple but for the life of me i cant seem to figure out why it refuses to work.. if use the like plugin generator http://developers.facebook.com/docs/reference/plugins/like/ and from that got this iframe <iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.lightandspace.co.uk%2F&send=false&layout=standard&width=400&show_faces=false&action=like&colorscheme=light&font=arial&height=35" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:400px; height:35px;" allowTransparency="true"></iframe>
what happens is that it says it cant load the page as if the link is broken but i dont know why ??
Ive also tryed the js/html5 method but that just fails to display at all.
any helps much apreciated
I created a jsFiddle for this at http://jsfiddle.net/JkZna/, and it seems to work. Could you add the location of your website and the exact error generated?
Note that you cannot run the Facebook plugin as is locally.
In your iframe code:
<iframe src="//www.facebook.com/
Are you sure that isn't supposed to be:
<iframe src="http://www.facebook.com/

facebook like got me crazy

my prestashop facebook like button keep giving me ERROR in red no matter what i do.
I have my facebook like set up successfully if i do this
<iframe src=“http://www.facebook.com/plugins/like.php?href=http://URL.com&layout=standard&show_faces=false&width=450&action=like&font=verdana&colorscheme=light&height=35” scrolling=“no” frameborder=“0” style=“border:none; overflow:hidden; width:450px; height:35px;” allowTransparency=“true”></iframe>
However, this above post this problems:
1) It post a static url as URL.com to my facebook whenver the LIKE is clicked. How do i make the url to be dynamic according to the product page currently viewed?
2) Whenever i click LIKE, my facebook wall will delete the previous product which i like and add the latest one to the top.
3) How do i get the exact picture which i click LIKE posted to facebook?
To solved the dynamic URL for question (1), i then try this from here. However it then post me error after the button is clicked.
<iframe src="http://www.facebook.com/plugins/like.php?href={php} echo 'http://'.$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI']; {/php}&layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0" allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:35px; margin-top:10px; margin-bottom: 0px"></iframe>
I have done some research on the successful website for this feature such as this. When i view the page source it has this as below:
<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.prodaja-nakita.rs/product.php?id_product=129&
layout=standard&show_faces=false&width=450&action=like&colorscheme=light" scrolling="no" frameborder="0"
allowTransparency="true" style="border:none; overflow:hidden; width:450px; height:35px; margin-top:10px; margin-bottom: 0px"></iframe>
I have exactly the same as it when i do a compare with my url page source.
As for the question (3), if it cannot get me the exact picture, i would prefer something like This where it allow user to select which picture to choose. ** CLick on the facebook share to test it out.
I have even tried install V1.1.1 facebook like button from here but still having same problem.
FYI, i am using prestashop 1.3.7. In order to get this facebook like button to work, i have uninstalled the chrononical Url, turned off the friendly URL feature. whewwww....
Somebody please help
i found out that it is because of the Ip address you key in when your page is offline.
Remove the ip and enable the shop and the like button works great