Empty Facebook share dialog box - facebook

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

Related

How does the addThis facebook like button work?

Can anyone please explain how the addThis facebook like button works?
The code for adding the button is
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a>
I'm going through the code of a website with pages listing details of different products. There is this fb like button on each of those pages. What exactly is liked here? Since I don't provide any facebook URL which specifies the page or image or anything related to this product that I've already put on facebook, what is this like button liking?

Facebook like does not show faces

I know this question has been asked before, but no answer I've found here or elsewhere has resolved my issue.
I would like my Facebook Like-button to show faces of friends who have liked the same page. Now it does not. If I like the page it shows my facebook profile picture but no other.
I know I have friends who have liked said page. They cannot see my picture either
I have used the HTML5 implementation of the button with following html: <div class="fb-like" data-width="300" data-show-faces="true" data-send="true"></div>
There is no issue with the height of the container since it can show one face (my own)
The URL of the page to like is not set in the fb-tag since it's a dynamic like-button that's availible on several pages.
See it in action on the right side of this page: http://www.takespace.se/Campaign/Stoppa-slavhandeln-i-Sverige

Share Dialog code not working in IE correctly

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.

Facebook share button issue

I added the facebook share button within an email body (.htm). The purpose of the button is to share the photo a user received in his email. When the button is clicked, a new tab opens with the "Write a message" area to share on facebook.
The problem is that once "Share Link" button is clicked nothing happens - no confirmation, no redirect, BUT the link is actually posted on Facebook (so the end user would not know the message has been shared unless they check their Facebook while all confused). Here is the code for the button:
<a title="Share this photo"
href="http://www.facebook.com/sharer.php?
s=100
&p[url]=%PHOTO_LINK%.jpg (dynamically populated link)
&p[title]=Check out my pic!"
target="_blank">
<img src="someplace.png"
alt="Share on Facebook" height="50" width="50" />
</a>
I have tried using meta tags (title/description/url and the main namespace tag), but they are not picked up when shared (title/description is a bunch of random characters). Is this behaviour normal for share buttons of this sort, is it a bug or am I doing something wrong?
Thanks in advance
To fix this, put target="_blank" in the <a> tag.
You won't be able to share a photo within an email as it would mean sharing the URL to the email itself (which users won't have access to).
Instead, you should put the image on a website and use OpenGraph markup to give it a correct title, description, and thumbnail image. And then share the URL to this image on Facebook. You can still embed the image in the email, but the sharing and image need to be external from the email.
A lot has happened since 2012. There are now two API's a user may choose from when sharing on Facebook: 1) Sharer, and 2) Share Dialog.
Sharer: This will require confirmation of the user posting their content, and this will then get you what you want. However, Sharer only supports the url parameter now. There is basically no way to share any other parameter. Official Facebook Developer Docs: Share Button. And: Official Facebook Discontinuation of Sharer Non-URL Args Post.
Share Dialog: You will need to configure an App with Facebook, authenticate, and then to solve your problem, you'll want to set one of these params...
display : Set this to page (the default), or one of the other options, to determine how your share dialog displays.
redirect_uri : If you don't like how Facebook decides to interpret your display params, you can just redirect after sharing to some page on your site that says, "Post successfully shared! link to post" or some such.
Hope this helps someone.

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