sf-static/alternative-web/test.html

17 lines
736 B
HTML
Raw Permalink Normal View History

2023-02-28 18:21:07 +00:00
<html>
<head>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js" integrity="sha256-T/f7Sju1ZfNNfBh7skWn0idlCBcI3RwdLSS4/I7NQKQ=" crossorigin="anonymous"></script>
<script>
const herokuUrl = 'https://cors-anywhere.herokuapp.com/';
const endpointUrl = 'https://cdn.syndication.twimg.com/widgets/followbutton/info.json?screen_names=stackoverflow';
axios.get(herokuUrl+endpointUrl)
.then(function (response) {
alert(data[0]['followers_count']);
})
.catch(function (error) {
console.log(error);
});
</script>
</head>
</html>