Click here to Skip to main content
15,885,954 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: (min) / (max) Pin
Jeremy Falcon9-May-23 4:09
professionalJeremy Falcon9-May-23 4:09 
GeneralRe: (min) / (max) Pin
Richard MacCutchan9-May-23 4:53
mveRichard MacCutchan9-May-23 4:53 
GeneralRe: (min) / (max) Pin
Jeremy Falcon9-May-23 5:55
professionalJeremy Falcon9-May-23 5:55 
QuestionFacing issues while handling the submit button in a reactjs form Pin
Ankan Chanda 202326-Apr-23 22:23
Ankan Chanda 202326-Apr-23 22:23 
Questionhttps intranet with certificate signed by local CA Pin
Member 159703184-Apr-23 4:20
Member 159703184-Apr-23 4:20 
AnswerRe: https intranet with certificate signed by local CA Pin
Jeremy Falcon11-Apr-23 4:17
professionalJeremy Falcon11-Apr-23 4:17 
GeneralRe: https intranet with certificate signed by local CA Pin
Member 1597031813-Apr-23 0:39
Member 1597031813-Apr-23 0:39 
GeneralRe: https intranet with certificate signed by local CA Pin
Richard MacCutchan13-Apr-23 0:47
mveRichard MacCutchan13-Apr-23 0:47 
QuestionCenter text vertically with relative height Pin
_Flaviu2-Apr-23 21:34
_Flaviu2-Apr-23 21:34 
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 

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.