Share Dialog code not working in IE correctly - facebook

This code from FB is working great on Chrome, FF, Safari, but on IE it redirects the page to FB instead of opening the new window. Does anyone know why this might be?
<a href="http://www.facebook.com/pages/Bow-Wow-Barrier/183857675040526"
onclick="
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog',
'width=626,height=436');
return false;">
<img border="0"; img src="http://www.bowwowbarrier.com/images/sharebutton.gif">
</a>

You must be login to use this. Otherwise, you won't get sharing box window rather it will show fb login box.

No mistake in Code. You must be login in browser to use this otherwise it should show fb login page.
here's the screenshot of working example.

Related

Facebook Iframe tab - Show the native photo lightbox?

I'm making Iframe app for Facebook's tab page. It has photos listing pulled from an Album.
Is there a way to show the native lightbox / popup for commenting. The one like shown in the picture below:
From the Graph API, I got the photo ID and all the data. Is there a way to initiate this event?
I can't seem to find the right term to Google it. I found an answer from 2011 saying it's impossible. Is it possible now?
As far as I have found, there's no way of doing this.
So, the simplest alternative is to open the photo in new browser tab.
Your link:
<a data-url="<?php echo $photo_url; ?>">
...
</a>
Javascript (using JQuery):
$("[data-url]").on("click", function(e) {
e.preventDefault();
var url = $(this).data("url");
window.open(url);
});

Empty Facebook share dialog box

There's a quite a few products and services on this site I manage. They all have a Facebook share dialog. However, when clicking on the share button (for all of them), an empty Facebook dialog box appears:
My code is exactly what is given on the facebook site:
<a href="#"
onclick="
window.open(
'https://www.facebook.com/sharer/sharer.php?u='+encodeURIComponent(location.href),
'facebook-share-dialog',
'width=626,height=436');
return false;">
Share on Facebook
</a>
Any ideas on what could be causing this?
Thanks to +phwd over in the #facebook freenode chatroom for the answer:
My link was wrong. I should have included this in my original post. Here's what I had before:
https://www.facebook.com/sharer/sharer.php?title&url=http%3A%2F%2Fwww.some_site.com%2Fsome_page
I needed to do 2 things to fix this:
Remove title
change url to u
So it comes out like this:
https://www.facebook.com/sharer/sharer.php?u=http%3A%2F%2Fwww.some_site.com%2Fsome_page

Facebook Like button shows url for my dev site

I'm using a 503 page as a 'coming soon' splash page. It has a FB like button on it.
I have been able to get the description and title to pull across, but the url of my site is wrong..
my normal url is like example.com, and the url displayed is my dev site - dev.example.com
I have searched all the files I can think of for dev. and can't find it anywhere..
Clicking the title link provided on facebook actually takes you to the correct url, but it's just the url displayed underneath that is visually wrong.
any ideas?
check the configuration of your app in fb or:
<div class="fb-like" data-href="YOUR_URL" data-send="true" data-width="450" data-show-faces="true"></div>
or
<fb:like href="YOUR_URL" send="true" width="450" show_faces="true"></fb:like>
Is there any server side redirection from your example.com to dev.example.com? The Like button script will resolve those and present the user with the end URL.

Facebook Iframe link only open within the iframe

I feel like people have been having the opposite of this problem, I cannot figure how to have links open up outside of fb and not with the iframe.. I am posting material that rests in an FB app hosted by my server. The page has links to other sites, but when they open up they are still in the facebook iframe.
using basic:
<a href= "http...."><b>Blank.com</b>
looks like this
Click link...
I'm a rookie and any help would be great. Thanks
target="_blank" works if you have set up an app for the iframe.
Have you tried the target attribute?
example.com

Facebook Graph API using ASP.NET with fancybox

Anyone know of some trick I can use to get facebook to authenticate a user within a fancybox iFrame? ... when I use the following code facebook dosent present the user with a login box, rather it gives them a link to facebook which puts the user back in the parent window
<a id="aFbLogin" href="https://graph.facebook.com/oauth/authorize?client_id=XXX&redirect_uri=http://ahost.com/callback.aspx&scope=email" type="text/html"><img style="border-style: none"
src="/Images/fBookLogin.png" alt="FaceBook Login Button"
title="Login with FaceBook" id="btnFbLogin" height="36" width="67" /></a>
Then some JavaScript to add the click event handler ... the pop up works .. but Facebook seems to not like being in an Fancybox-iFrame
Facebook has various measures (using css and javascript) in place to ensure that it is never hosted in an iframe. I'm afraid you are limited to using the popup implementation provided with the javascript sdk.