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), '">';
?>
Related
<%--Facebook Like Box--%>
<div class="fb_iframe_widget">
<iframe src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2FRumour-Entertainments-Agency%2F63822323174&width=260&height=350&show_faces=false&colorscheme=light&stream=true&border_color&header=true&appId=123233914444256" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:260px; height:350px;" allowTransparency="true"></iframe>
</div>
It looks like facebook have been tinkering yet again! If you have a like box on your website it will only show up if you are logged in to facebook itself! What is the point though? What if a person does not have facebook? Is there a way to keep the like box on the website without having to log in to facebook to view the like box?
Am i not passing the facebook security checks if there any? Dont know whats changed from before so bit clueless at the moment.
I think the reason is that you are referring to page which requires authentication.
I see you have in src attribute value of your URL as follows:
http://www.facebook.com/pages/FRumour-Entertainments-Agency/63822323174
and when you try it in browser separately it requires authentication
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/
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
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
I'm writing a simple splash page for a client to hold a like box widget:
<iframe src="http://www.facebook.com/plugins/likebox.php?id=***********&width=238&connections=4&stream=false&header=false&height=200" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:238px; height:200px;" allowTransparency="true"></iframe>
The page displays fine, with the like box, but when you click on the like it depresses without prompting the user to logon and does not update facebook. This behavior seems to be on mobile browsers only. On desktop browsers (ie8, firefox, safari) it works just fine.
Anyone had this happen, and if so what was their solution?
most of the mobile browsers does not support or have poor suppport for iframe.