-2

I've created my own social media icon like so:

<a  href="https://www.facebook.com/sharer/sharer.php?u=example.org" 
target="_blank"><div 
class="containercross">
<div class="cross1">
<div class="cross2"></div>
</div>
</div></a>

Css:

.cross1 {height:30px; 
width: 7px; background- 
color: black; margin-left: 
50px;} 
.cross2 {height:30px; 
width: 7px; background- 
color: black; margin-left:  
50px;transform:ro
tate(90deg);margin- 
left:0px;} 

My question is whether u=example.org from the code above will display example.org when sharing or my site name? Otherwise how would it know what my site name was?

Fresh
  • 51
  • 8

1 Answers1

0

Facebook uses the u parameter to know which site to link to, then pulls the displayed information from metadata elements present in that site's head section, such as title and various opengraph meta elements.

See this CSS Tricks article for more info. Examples they give include:

<meta property="og:title" content="European Travel Destinations">
<meta property="og:description" content="Offering tour packages for individuals or groups.">
<meta property="og:image" content="http://euro-travel-example.com/thumbnail.jpg">
<meta property="og:url" content="http://euro-travel-example.com/index.htm">
Lionel Rowe
  • 5,164
  • 1
  • 14
  • 27
  • Thanks. So even though it doesn't mention my site title above, amd my site name is not `example.org` it will know which site has directed it there and list that site? – Fresh Sep 04 '20 at 11:12
  • Nope. You need to change the `u` parameter to your own site. The `Referer` header isn't used (at least not for pulling the information, anyway, though I'm sure Facebook tracks it given how much they love collecting data). – Lionel Rowe Sep 04 '20 at 11:15