Code Monkey home page Code Monkey logo

Comments (5)

rappo avatar rappo commented on August 22, 2024

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="">

from core.

nathanathan avatar nathanathan commented on August 22, 2024

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.

from core.

alixaxel avatar alixaxel commented on August 22, 2024

@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. =\

from core.

vaishali123 avatar vaishali123 commented on August 22, 2024

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

from core.

rappo avatar rappo commented on August 22, 2024

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

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.