How do I share an image on Twitter?

0 favourites
  • 2 posts
From the Asset Store
Elevate your games with our AI Chatbot Integration! Seamlessly connect your Construct 3 projects with GPT-4 for dynamic,
  • Ok so I'm starting to get mad with this, can't find a solution/explanation to make it work but (and I'm quite stupid because I lose the file) I already did this perfectly last year.

    How can I share an image or a gif or even a video on twitter and instagram?

    My code is like:

    -> Browser: Go to "https://twitter.com/intent/tweet? &text=This is a my text. http://game-url-here.com &img to URL(http://www.game-url-here.com/my-image.jpg/)" (target self)

    Please help me! I trying to resolve this for hours!! How is it possible to not have a proper working action include in construct?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I didn't find it out yet but remember something about twitter card.

    It's quite simple you just have to had some code on your index.html page. When you call your tweet with your referred game's page (with browser object), it will automatically display an image or video with desc and title.

    Infos there:

    https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards

    And here is what the code should look like inside your page:

    <meta name="twitter:card" content="summary"/>
    <meta name="twitter:site" content="@yourname"/>
    <meta name="twitter:creator" content="@yourname"/>
    <meta property="twitter:description" content="Your text"/>
    <meta property="twitter:image" content="https://www.your-website.com/your-image.jpg"/>
    

    And finally the page to test your image:

    cards-dev.twitter.com/validator

    Hope it will help you guys, especially if you are as lost as I am XD

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)