Twitter map validator on localhost

So, I'm testing Twitter and Facebook sharing features.

I am currently testing the Twitter share button, I have added meta tags, and after several hours of searching, I have found that it is possible for me to embed tweets (embed twitter images in my tweets that link back to my website) I need Twitter cards.

My meta code:

  <meta name="twitter:card" content="summary_large_image"> <meta name="twitter:site" content="http://MY_IP_ADDRESS:3000/"> <meta name="twitter:creator" content="@random"> <meta name="twitter:title" content="Parade of Fans for Houston's Funeral"> <meta name="twitter:description" content="NEWARK - The guest list and parade of limousines with celebrities emerging from them seemed more suited to a red carpet event in Hollywood or New York than than a gritty stretch of Sussex Avenue near the former site of the James M. Baxter Terrace public housing project here."> <meta name="twitter:image" content="http://cdn0.lostateminor.com/wp-content/uploads/2015/10/Amazing-long-exposure-photos-make-light-look-like-cobwebs-on-trees2-650x434.jpg"> 

Then a sharing button that looks like this:

  <img src="http://cdn0.lostateminor.com/wp-content/uploads/2015/10/Amazing-long-exposure-photos-make-light-look-like-cobwebs-on-trees2-650x434.jpg"> <a href="https://twitter.com/intent/tweet?button_hashtag=test" data-url="http://localhost.share.com/" target="_blank">Tweet #test</a> </img> 

When I tweet a hash tag, it doesn't display my image or tweet it. So I tried to launch my site (I am testing it on my localhost on Twitter Card Validator) https://cards-dev.twitter.com/validator .

I get this error message: error message

Any ideas what I did wrong? Or why can't I use my IP address so that I can check Twitter maps?

Thanks!

+5
source share
1 answer

I thought I would leave it here if anyone came across this. Since I asked a question a long time ago, I cannot remember the work, but the simplest solution, I think, would be to use ngork.

https://ngrok.com/

Download ngrok. Run your server locally, then point ngrok to the port on which your local server is running, and it will spit something out line by line ...

 Session Status online Version 2.1.18 Region United States (us) Web Interface http://127.0.0.1:4040 Forwarding http://65hkdy7ed.ngrok.io -> localhost:3000 Forwarding https://65hkdy7ed.ngrok.io -> localhost:3000 

And there you have your url to use :)

+5
source

Source: https://habr.com/ru/post/1232980/


All Articles