0

I am using Twitter's own Tweet button on a page that I display in a Fancybox window.

Page is displayed from:

<a class="fancybox fancybox.iframe" href="http://my_domain.com/xyz?param=value">

The Tweet button code is on the xyz page.

Everything works as expected except that when the Tweet button is clicked the tweet dialog shows the url and title as the page that the Fancybox was opened from instead of the page in the Fancybox window (xyz?param=value) that the Tweet button is on.

Is there a way to get the Tweet button to use the title and url of the page being displayed in the Fancybox window?

  • Hi there, Do you have a URL we can hit and see this happening? Thanks! Matt – Matt Cashatt Dec 21 '11 at 18:40
  • @MatthewPatrickCashatt You can use this one. The Fancybox will open from any of the icons in the info column. yoid.com/domain/2011/12/21/index_9.php – user191688 Dec 21 '11 at 18:44
0

Visit the Twitter dev documentation here:

https://dev.twitter.com/docs/tweet-button

You have at least two options:

Option 1

If you are using the JavaScript version of their buttion, go to section entitled "Properties which can be used by the Javascript Tweet Button". Follow the instructions for overriding the URL.

Option 2

Create your own Twitter anchor using a twitter graphic (just google "Twitter Graphics") and then use your server-side language to construct the appropriate URL with your own data but following their pattern. By pattern, I mean the href that they stick in your generated Twitter buttons. I did exactly that for all the Twitter buttons in this app:

http://www.facebook.com/office365?sk=app_236629039698110

Hope this helps!

Matt

  • Thanks. I found that after posting this question. :) – user191688 Dec 21 '11 at 19:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.