Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8185199
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:45:50+00:00 2026-06-07T01:45:50+00:00

When copying and pasting the following code for a Twitter button into a text

  • 0

When copying and pasting the following code for a Twitter button into a text file:

<a href="https://twitter.com/share" class="twitter-share-button" data-via="jpkcambridge">Tweet</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

I get a javascript error saying ‘failed to load resource file://platform.twitter.com/widgets.js’

What could be causing this? Thought I should be able to just copy and paste the code from Twitter.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T01:45:52+00:00Added an answer on June 7, 2026 at 1:45 am

    You’re trying to load a protocol-less URL in a local file. Twitter is serving its script via //platform.twitter.com/widgets.js, which translates to the file: protocol locally. That’s the best practice for serving content (it will not generate those annoying mixed content warnings in IE), but just plain won’t work in local files.

    Try updating that line of the script to https://platform.twitter.com/widgets.js. That should help you test locally; once you’re done testing, flip it back to the protocol-less structure.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am copying code from website matplotlib and pasting into the Vim editor in
Think of the following code: static int Main() { byte[] data = File.ReadAllBytes(anyfile); SomeMethod(data);
Sometimes when a user is copying and pasting data into an input form we
I am following Apples Core Data Tutoriol but implementing it into my own Project,
I'm following step-by-step (basically copying and pasting stuff) this spring-ws tutorial and I just
I have about 10 drop down list controls that get populated. Instead of copying/pasting
I'm copying a range from the page and pasting it back elsewhere, but this
Copying a File using a straight-forward approach in Python is typically like this: def
I am copying a file to a directory, and then setting an environment variable
I have problem with copying sdf file to WM emulator. My solution structure MyApp.DataLayer

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.