Alon
Alon

Reputation: 7758

How to assign the dynamic link for "like button" of google+ and twitter

I have a website that has an iframe in it that contains dynamic content (one time it is this link and other time it is that link etc..) . outside the iframe (in the regular site) I have 3 social buttons: Facebook Twitter & Google+.

I want the user to click on the social-buttons outside the iframe - but to like the iframe itselft *

To connect the iframe link to facebook is easy because I have data-href and I can put there the iframe's link:

<div class="fb-like" data-href="http://www.theIframeLinkIwant.com/" .../>

However how do I do it for twitter & Google+ - they don't have that sort of field:

<g:plusone size="medium" annotation="inline" width="120" class="googlePlus"></g:plusone>

<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a>

thanks, Alon

Upvotes: 0

Views: 1398

Answers (2)

Alon
Alon

Reputation: 7758

the issue for google+ was in the advance option:

just needed to add the href:

<g:plusone annotation="inline" href="http://www.whatever.com"></g:plusone>

Upvotes: 1

Alexandros B
Alexandros B

Reputation: 1891

For the twitter button read here

<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.yourwebsite.com">Tweet</a>

For google plus read here

<g:plusone annotation="inline" href="http://www.yourwebsite.com"></g:plusone>

Upvotes: 1

Related Questions