Skip to content
Loading
step 2. Dynamically change url
  1. $("#btn").click(function(){  
  2. url="your url here";  
  3. $(".fb-page").data('href',"https://www.facebook.com/' + uri +'");  
  4.   
  5. });  
 
+3
  • Ganesan C
    +2
    Hi, 
     
    Please check below link.It might help you. 
    • https://stackoverflow.com/questions/20035235/adding-facebook-like-buttons-dynamically-after-loading
    • https://stackoverflow.com/questions/27888999/loading-facebook-sdk-on-click 
    +2
  • Ganesan C
    +1
    Hi, Please change your script append as below.
     
    1. $('.SocialMediaAccount').append(' + 'script>');  
     
    +1
  • Sachin Singh
    +1
    not sure, but change the position of script and div, may load the Facebook URL.
    1. else if (NewUrls == "facebook") {  
    2. $(".SocialMediaAccount").empty();  
    3. //$('#socialMediaAccount-loder').toggle();  
    4. $('.SocialMediaAccount').append(' + 'script>');  // first   
    5.   
    6. $('.SocialMediaAccount').append(' + uri + '" data-tabs="timeline" data-width="350" data-height="350" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true">
    '); // second  
  •   
  • }  
  •  
    +1
  • Rijwan Ansari
    +1
    You can create from this url.
    https://developers.facebook.com/docs/plugins/page-plugin/
     
    Include the JavaScript SDK on your page once, ideally right after the opening body tag.
    1. <div id="fb-root">div>  
    2. <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v12.0&appId=" nonce="">script>  
     Place this code wherever you want the plugin to appear on your page.
    1. div class="fb-page" data-href="https://www.facebook.com/....../" data-tabs="timeline" data-width="" data-height="" data-small-header="false" data-adapt-container-width="true" data-hide-cover="false" data-show-facepile="true"><blockquote cite="https://www.facebook.com/" class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/"><Name of Page>a>blockquote>div>  
     
    +1
  • +1
    reddit.com/r/MannitedAtalantanow/
    reddit.com/r/ManutdAtalantalivetv/
    reddit.com/r/ManutdvAtalantalive/
    reddit.com/r/ManutdAtalantalivest/
    reddit.com/r/ManutdAtalantalive/
    reddit.com/r/BarcelonaDynamolivest/
    reddit.com/r/Atalantamanutdlive/
    reddit.com/r/Atalantavmanutdlive/
    reddit.com/r/dynamoKyivBarcalive/
    reddit.com/r/BarcadynamoKyivlive/
    reddit.com/r/BarcavdynamoKyivst/
    reddit.com/r/BarcavsDynamoKyivst/
    reddit.com/r/Lillevsevillalive/
    reddit.com/r/Sevillavlille/
    reddit.com/r/Youngboysvillarreal/
    reddit.com/r/Villarrealvyoungboys/
    reddit.com/r/BenficavBayernlive/
    reddit.com/r/Bayernvbenficalivest/
    reddit.com/r/Bayernvbenficalive/
    reddit.com/r/ZenitvJuventuslive/
    reddit.com/r/Juventuszenitlive/
    reddit.com/r/Juventusvzenitlive/
    +1
  • Pranam Bhat
    +1
    Keep the URL generic way. So that it would be not touched in future.

    Also, you need to add a timer/refresh to make it up-to-date with notification feed.
    +1
  • Sachin Singh
    0
    any error in the console?
    0