javascript - Sharing to Tumblr using AngularJS ng-click is banned - Stack Overflow

So, I am trying to implement a share to tumblr button. When the button is clicked I want it to open a n

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:

?

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("", '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!

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./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./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!

Share Improve this question asked Oct 3, 2015 at 16:02 Tom O'BrienTom O'Brien 1,8419 gold badges47 silver badges76 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 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.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745388335a4625543.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信