Sharing to Tumblr using AngularJS ng-click is banned
Asked Answered
C

1

5

So, I am trying to implement a share to tumblr button. When the button is clicked I want it to open a new window with the details of the current page etc. This is working fine for facebook, twitter, etc.

But when I do it for tumbler, when the new window gets opened by the user it doesn't load the normal share window, but redirects to this URL:

https://www.tumblr.com/widgets/share/tool/banned?

And displays the following text:

Not Available for Sharing

I am doing this new window stuff from an AngularJS controller called by the ng-click directive.

The controller code is:

$scope.openWindow = function() {
    window.open("http://www.tumblr.com/share", 'newwindow', 'width=400, height=400');
}

The html looks like this:

ng-click="openWindow()"

My website is just running on the development environment and running on the localhost. I was wondering if this has anything to do with it?

PS The example I used above is the simplest code in the documentation. In reality my url will have a few query parameters giving some more detail about the page - but it doesn't even seem to work for me for the most basic type!

Camfort answered 3/10, 2015 at 16:2 Comment(0)
E
9

It seems Tumblr is doing this only for localhost environments. I have similar code and I get the same error only locally. Try it on production or an actual domain. It should work.

Endow answered 14/10, 2015 at 1:0 Comment(1)
Cheers jedi - I suspected as much!Ivoryivorywhite

© 2022 - 2024 — McMap. All rights reserved.