Click here to Skip to main content
16,018,442 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: Center text vertically with relative height Pin
Richard Deeming2-Apr-23 22:12
mveRichard Deeming2-Apr-23 22:12 
GeneralRe: Center text vertically with relative height Pin
_Flaviu2-Apr-23 22:59
_Flaviu2-Apr-23 22:59 
AnswerRe: Center text vertically with relative height Pin
Graeme_Grant2-Apr-23 22:36
mvaGraeme_Grant2-Apr-23 22:36 
GeneralRe: Center text vertically with relative height Pin
_Flaviu2-Apr-23 23:01
_Flaviu2-Apr-23 23:01 
QuestionFinal Project ideas that integrates ChatGpt Pin
Mohamad Shoumar29-Mar-23 5:16
Mohamad Shoumar29-Mar-23 5:16 
AnswerRe: Final Project ideas that integrates ChatGpt Pin
Gerry Schmitz29-Mar-23 5:50
mveGerry Schmitz29-Mar-23 5:50 
QuestionHow to add horizontal line under DIV Pin
wenwan131424-Mar-23 19:08
wenwan131424-Mar-23 19:08 
AnswerRe: How to add horizontal line under DIV Pin
Richard MacCutchan24-Mar-23 22:37
mveRichard MacCutchan24-Mar-23 22:37 
GeneralRe: How to add horizontal line under DIV Pin
Gerry Schmitz29-Mar-23 5:53
mveGerry Schmitz29-Mar-23 5:53 
AnswerRe: How to add horizontal line under DIV Pin
Jeremy Falcon27-Mar-23 4:46
professionalJeremy Falcon27-Mar-23 4:46 
GeneralRe: How to add horizontal line under DIV Pin
vefaakin6-Feb-24 22:27
vefaakin6-Feb-24 22:27 
GeneralRe: How to add horizontal line under DIV Pin
Richard Deeming6-Feb-24 22:40
mveRichard Deeming6-Feb-24 22:40 
GeneralRe: How to add horizontal line under DIV Pin
Jeremy Falcon7-Feb-24 5:56
professionalJeremy Falcon7-Feb-24 5:56 
AnswerRe: How to add horizontal line under DIV Pin
Jeremy Falcon27-Mar-23 4:47
professionalJeremy Falcon27-Mar-23 4:47 
Questionfacebook and twitter share button plugins not working properly Pin
Member 1595298024-Mar-23 2:13
Member 1595298024-Mar-23 2:13 
I am attempting to add facebook and twitter share button plugins to the pages of a website I am working on. So far I have only added them to three pages because I am having mixed results with functionality on both my local copy of the site and the live version.

In order to generate the code for the facebook share button on each page, I followed the instructions here - https://developers.facebook.com/docs/plugins/share-button.

In order to generate the code for the Twitter share button, I followed the instructions here https://publish.twitter.com/#


For both the facebook and twitter share buttons I generated the code using the urls of the live site and pasted that code in both the relevant live and local pages.

The code generated and embedded in the divs "shares" and "share-box" is as follows:

HTML
<pre><!-- FACEBOOK SHARE - JavaScript SDK -->
<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v16.0" nonce="bZ0Vs3J7"></script>

			<div id = "shares">
				
				<!-- FACEBOOK SHARE PLUGIN CODE-->
				<div class = "share-box">
				<div class="fb-share-button" 
					data-href="https://superspreads.co.uk/superspreads-area-I-cover--plasterer-dewsbury-west-yorkshire.html" 
					data-layout="button" 
					data-size="small">
					
					<a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fsuperspreads.co.uk%2Fsuperspreads-area-I-cover--plasterer-dewsbury-west-yorkshire.html&src=sdkpreparse" class="fb-xfbml-parse-ignore">Share</a>   
				</div>
				</div>
				
				<!-- TWITTER SHARE PLUGIN CODE-->				
				<div class = "share-box ">
				<a href="https://twitter.com/share?ref_src=twsrc%5Etfw" 	
					class="twitter-share-button" 
					data-show-count="false">Tweet</a>
					
				<script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>
				</div>

			</div>


Opera is the only browser that tolerates the plugins on both a local copy of the site and the live version

In firefox, the local copy of the site tolerates both the plugins and they work as intended. That is clicking the "share" or "tweet" buttons activates the relevant plugin and provides the opportunity to share the chosen url on facebook and twitter respectively. The information in the page specific open grapgh tags and twitter meta tags are collected also.

As you hover over the facebook button, prior to clicking, the code that will be parsed is:
https://www.facebook.com/sharer/sharer.php?kid_directed_site=0&sdk=joey&u=https://superspreads.co.uk/superspreads-area-I-cover--plasterer-dewsbury-west-yorkshire.html&display+popup&ref=plugin&src=share_button

As you hover over the twitter button, prior to clicking, the code that will be parsed is:
https://twitter.com/intent/tweet?ref_src=twsrc^tfw|twcamp^buttonembed|twterm^share|twgr^&text=Areas I cover| Plasterer | Super Spreads - Dewsbury - West Yorkshire&url=https://superspreads.co.uk/superspreads-area-I-cover--plasterer-dewsbury-west-yorkshire.html


With the live site, firefox shows the anchor text for each button, "Share" and "Tweet", when the page is first loaded, but not the graphics for each button. When the page is refreashed "Share" dissappears. "Tweet" remains and the link works to a point but not all the intended code is parsed. The plugin is reduced to providing you a means to tweet something but not share the intended url. Hence as you hover over the twitter anchor text, in this instance, the code that will be parsed is:
https://twitter.com/share?ref_src=twsrc^tfw

chrome and edge behave the same for both the local and live versions of the site: The facebook button functions and displays as intended. The twitter button only displays the link text, "Tweet", and as with the live firefox twitter link, not all the intended code is parsed.


safari struggles to fully load the pages of the local version of the site that have the facebook and twitter plugins code active on them. And won't go beyond the SERP when you click on the live site link there.


Because the plugin code comes from the recommended sources, and has been pasted into the sites html as instructed, I really am at a loss as to how to tackle the problem. Has anyone encountered this before and solved the issue?

I wondered if it might be something to do with my host provider but then the problems are not limited to the live site....

Thanks, in anticipation of your response.
AnswerRe: facebook and twitter share button plugins not working properly Pin
Member 1595298027-Apr-23 5:32
Member 1595298027-Apr-23 5:32 
AnswerRe: facebook and twitter share button plugins not working properly Pin
Member 1595298027-Apr-23 6:01
Member 1595298027-Apr-23 6:01 
QuestionI need ready-made web page codes in html and css / احتاج الى اكواد صفحه ويب جاهزة بلغة htmlو css Pin
Hussein Bajeham22-Mar-23 22:16
Hussein Bajeham22-Mar-23 22:16 
AnswerRe: I need ready-made web page codes in html and css / احتاج الى اكواد صفحه ويب جاهزة بلغة htmlو css Pin
OriginalGriff22-Mar-23 22:18
mveOriginalGriff22-Mar-23 22:18 
QuestionThree divs inside a div Pin
_Flaviu21-Mar-23 5:50
_Flaviu21-Mar-23 5:50 
AnswerRe: Three divs inside a div Pin
Jeremy Falcon21-Mar-23 11:39
professionalJeremy Falcon21-Mar-23 11:39 
GeneralRe: Three divs inside a div Pin
_Flaviu22-Mar-23 1:23
_Flaviu22-Mar-23 1:23 
GeneralRe: Three divs inside a div Pin
Jeremy Falcon22-Mar-23 5:02
professionalJeremy Falcon22-Mar-23 5:02 
GeneralRe: Three divs inside a div Pin
_Flaviu26-Mar-23 23:23
_Flaviu26-Mar-23 23:23 
GeneralRe: Three divs inside a div Pin
Jeremy Falcon27-Mar-23 4:32
professionalJeremy Falcon27-Mar-23 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.