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

  • Home
  • SEARCH
  • 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 4064612
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:52:39+00:00 2026-05-20T15:52:39+00:00

first off a short explanation… the following two lines assure that once my website

  • 0

first off a short explanation… the following two lines assure that once my website is shared on facebook a custom image (share-thumbnail.png) is posted.

<meta property="og:image" content="images/share-thumbnail.png"/>
<link rel="image_src" href="<images/share-thumbnail.png" />

Can you guys think of any creative way to overwrite that behaviour when I click a specific sharing link on my page?

E.g. i have a <a class="special-sharing" href="#">Share with special image</a> anchor on my page and when that one is clicked I don’t want to use the share-thumbnail.png defined in my header.

My thought was to use jquery to listen to click events on the .special-sharing link and then… preventDefault(); and change e.g. the content attr of my meta tag in the head to a new image src. Then call the facebook?sharer= blabla.

How would you solve that?

  • 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-05-20T15:52:40+00:00Added an answer on May 20, 2026 at 3:52 pm

    (Caveat: I’m not familiar with Facebook’s API, just Javascript and the web in general.)

    Unfortunately, you can’t.

    While it’s possible to affect <meta> and <link> tags with jQuery (or Javascript in general), it isn’t possible to make changes outside the currently-loaded copy of the page in the user’s browser. When the link to Facebook is called, the current page is discarded and Facebook’s page is loaded, which then performs its own hit on your page to get the og:image, which will still have the original value because the file on the server hasn’t changed.

    Instead, you could perhaps set up your server so that you can customize the image via the URL. For example, have http://www.example.com/mypage.php produce the default value for og:image, but http://www.example.com/mypage.php?special-image=foo.gif change the value of the <meta> tag. You could then use Javascript to change the sharer passed to Facebook so that it uses the special URL that points to the special image.

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

Sidebar

Related Questions

First off, I would like to make clear, that I am SUPER NEW TO
First off I apologize if there is another post out there that answers this,
First off I'm not sure that's the proper title for this question but hopefully
First off, I’m not concerned with portability, and can safely assume that the endianness
first off I'm a noob to PHP but here is my problem. I am
First off, I'm coming (back) to Java from C#, so apologies if my terminology
First off I use this code to make the navigation bar always stay fixed;
First off, the function in question. bool Animation::loadFrames() { sf::Texture frame[frameCount]; std::string pathToFrame; for(int
First off, kudos to the amazing apache cordova team for making a platform-independent native-like
First off, I've never used GWT before. I have good experience in HTML/CSS/JS/JSP. I'm

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.