Skip to main content

Posts

Showing posts from November, 2020

Dynamic Facebook like button for your web articles | Code once and go viral on Facebook

Facebook allows its users to like web articles using their Facebook profiles and developers to configure a like button to put with their articles.  But you have to go to the Facebook developer page and paste your article's URL and copy the code given by the Facebook developer tools. It is not comfortable to copy-paste the code whenever you are writing or posting new articles. so javascript has the solution. Just follow these simple steps. You have to load Facebook SDK for Javascript once in your source code by adding this code between <body> </body> tags. <div id = "fb-root" ></div> <script async defer crossorigin = "anonymous" src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1 &version={graph-api-version} &appId={your-facebook-app-id} &autoLogAppEvents=1" nonce = "FOKrbAYI" > </script> Then we have to put the code of l