0
votes

I have a share link in the format of

https://www.facebook.com/sharer/sharer.php?u=http://www.domain.ltd

If you surf to my share url, a share dialog appears with the correct og metadata and everything.

If I click on my share url in a page used in a facebook page tab, the click action doesn't seem to be registered. The url is displayed in the status bar of the browser. No error messages from facebook, nothing. It's almost as if the click event is disabled.

The same goes for a twitter share link I have.

https://twitter.com/home?status=My%20message

What is the easiest way to make sharing a url or tweet possible from within a facebook page tab?

Using facebook authentication of users via the facebook api is not an option as we don't want to gather user information.

2

2 Answers

0
votes

digging into the javascript console I saw an error message: Refused to display 'https://www.facebook.com/sharer/sharer.php?u=...' in a frame because it set 'X-Frame-Options' to 'DENY'.

The solution was surprisingly easy: add target="_blank" to the share links. Facebook page tabs don't allow links to open within an iframe, so the solution is to make them open in a new window (that is allowed to contain an iframe).

0
votes

I had the same issue because some of my links where HTTP instead of HTTPS.