Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Twitter Cards support #42

Closed
1 of 4 tasks
rappo opened this issue Jul 15, 2013 · 5 comments
Closed
1 of 4 tasks

Add Twitter Cards support #42

rappo opened this issue Jul 15, 2013 · 5 comments
Assignees

Comments

@rappo
Copy link

rappo commented Jul 15, 2013

Add Twitter Cards support to:

  • Issue / bounty page
  • Fundraiser page
  • Project page
  • user profile page
@rappo
Copy link
Author

rappo commented Jul 15, 2013

Here's an example for Fundraisers:
image

using the following embed code:

<meta name="twitter:card" content="product">
<meta name="twitter:site" content="@bountysource">
<meta name="twitter:creator" content="">
<meta name="twitter:title" content="Fundraiser for JS-Git by creationix">
<meta name="twitter:description" content="Git SCM Implemented as a set of JavaScript modules for use in any JS runtime.">
<meta name="twitter:image:src" content="https://c10078377.ssl.cf2.rackcdn.com/5267b26626ce73a0392d246aa66b664e.jpg">
<meta name="twitter:data1" content="$9,081">
<meta name="twitter:label1" content="Raised">
<meta name="twitter:data2" content="$30,000">
<meta name="twitter:label2" content="Goal">
<meta name="twitter:domain" content="bountysource.com">
<meta name="twitter:app:name:iphone" content="">
<meta name="twitter:app:name:ipad" content="">
<meta name="twitter:app:name:googleplay" content="">
<meta name="twitter:app:url:iphone" content="">
<meta name="twitter:app:url:ipad" content="">
<meta name="twitter:app:url:googleplay" content="">
<meta name="twitter:app:id:iphone" content="">
<meta name="twitter:app:id:ipad" content="">
<meta name="twitter:app:id:googleplay" content="">

@nathanathan
Copy link

I'm uncertain whether including the dynamic content (e.g. project name and bounty amount) is feasible without using some server side code to generate the meta tags. I think some testing will be needed to see if twitter fully loads pages in phantomjs or something like it before reading the meta tags. I suspect they just scrape the html (edit: according to this SO answer that is the case). I also wonder if the cards will stay up-to-date with the bounty amount. URLs might only get crawled once, or rarely to generate cards. Also, since cards are a new feature the answers to these questions might change.

@ghost ghost assigned seanders Aug 30, 2013
MaksJS added a commit to MaksJS/frontend that referenced this issue Sep 1, 2013
Added a angular service called $metaTags to dynamically append twitter
meta tags
Twitter card need to be validated on
https://dev.twitter.com/docs/cards/validation/validator with
@bountysource twitter account
@alixaxel
Copy link

@nathanathan is right. I just ran a quick test to confirm this. My HTML looked like this:

...
<meta name="twitter:title" content="">
...

And then I used jQuery to populate the meta tag title:

$(function () {
    $('meta[name="twitter:title"]').attr('content', 'test title');
});

After uploading the page, I tried validating it using the Twitter Card Validator and this is what came back:

failed validation

Without some sort of server-side pre-population this doesn't seem possible at all. =\

@vaishali123
Copy link

Hey
I faced a problem
I used the product card code with dynamic URL like ynomy.rexwedsolution.com/id ...(id is product id which created at runtime)At this page i used the product caed meta tags ..But it is not working ..please help

@rappo
Copy link
Author

rappo commented Oct 21, 2013

Closing this issue, as it's a backend task that shouldn't be on the frontend issue tracker. Thanks everyone!

@rappo rappo closed this as completed Oct 21, 2013
@wkonkel wkonkel removed the bounty label Feb 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants