Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Twitter share button "frame was blocked"

After adding the Twitter share button from here:

http://twitter.com/about/resources/tweetbutton

My https site displays a small rectangular box appears on my pages with this error:

This frame was blocked because it contains some insecure content.

When I change the two http calls to https:

<a href="https://twitter.com/share"...
...src="https://platform.twitter.com/widgets.js">

I get a text "Tweet" link, which does work, but it doesn't have the images/layout from the Twitter site. The javascript call outputs this error in the code:

Failed to load source for: https://platform.twitter.com/widgets.js

Is there anything I can do to get this Twitter button working?

like image 396
Ryan Avatar asked Nov 26 '25 21:11

Ryan


2 Answers

Twitter currently doesn't offer the Tweet button via HTTPS so your only option at this stage is to roll your own.

like image 68
Marcel Avatar answered Nov 28 '25 11:11

Marcel


At this time tweetmeme does not seem to be secure either.

The only way to do this is securely to use a query string, e.g.

<A HREF=https://twitter.com/share?url=MYURL&via=VIA&text=TWEET>Tweet</A>

But there is no way to get the tweet count yet, and you have to dispose of the tweet window yourself.

like image 23
Lawrence Avatar answered Nov 28 '25 11:11

Lawrence