0

I have some buttons to share to social media sites including Facebook, Google+, LinkedIn, and Twitter. I would like to open the sharing dialog in an iframe rather than opening a new window, but all of them have X-Frame-Options set to either DENY or SAMEORIGIN.

Do any of these sites support doing what I want? Or do I just have to put up with a less desirable experience.

I am aware of the clickjacking vulnerabilities, and would be surprised if there was a way to do it. But I figured I might as well ask.

Thayne
  • 6,619
  • 2
  • 42
  • 67

2 Answers2

0

I recommend you have a look at this question: Overcoming “Display forbidden by X-Frame-Options”

This is not possible unless you wish to resort to an extremely hacky method (as shown in niutech's answer).

edit- actually this is not possible at all, as later versions of Chrome will prevent the iframe from loading.

Community
  • 1
  • 1
nick
  • 18,784
  • 2
  • 24
  • 31
0

You can't frame pages that don't want to be framed in modern browsers. But keep in mind that these are the share experiences the services provide so most users will be familiar with them.

Google+ also has the share button and interactive posts API that both work in page. Facebook used to have an in page version but it looks like they discontinued it.

abraham
  • 46,583
  • 10
  • 100
  • 152