Js.src = '///en_US/sdk.js#xfbml=1&appId=YOUR_APP_ID&version=v2.0' ĭon't forget to change YOUR_APP_ID to the correct value. Var js = document.createElement('script') The code is much simpler, since it doesn't need to check if the API has already been loaded. Now create a JavaScript function that loads the Facebook API on command (and not immediately like the original embed code does). Your HTML should contain something like this:ĭon't forget to change YOUR_WEBPAGE to the correct value. On the second div, add the attribute id="comments". Place both div elements into your HTML where Facebook told you to, but do not put the script in. The script loads the Facebook API after making sure it hasn't been already loaded. It doesn't do anything until the Facebook API is loaded. The second div is what contains the comments. Here's what each element does: The first div is a placeholder element that Facebook uses as part of its SDK. }(document, 'script', 'facebook-jssdk')) The embed code should look like this (HTML5): It's important to understand how it works before proceeding, as you'll be modifying it. The first thing you need to do is grab the official embed code from the Facebook developer site. This is because the Facebook API will have already been included, causing comments to load immediately. Note: If you have another Facebook plugin elsewhere on the site, such as the Like button, you won't be able to lazy load the comments. This makes it so that the plugin only loads when it comes into view. To avoid a less responsive site, you can lazy load the comments plugin. This can cause your site to load slower and make it feel less responsive. It's main downside versus a self-hosted comment system is that it incurs a lot of http requests. Click here to contact us.The Facebook comments plugin is an easy-to-use comment system that you can put on nearly any webpage. This button was created by PubNub Developers. This button is not associated with Facebook. This prevents a single person from showing more than her fair share of not caring. To cap the number of clicks per person, set the attribute one-click-per-person="on" in the DIV. We’ll update this blog with your suggestion and may change the icon that is distributed with the widget. If you have a suggestion or want to supply a different “Meh” Icon, then contact us with a link pointing to the icon. Because of this, PubNub built the Facebook “Meh” Button while listening to Donkey Kong Country Music from the SNES version. An image was drafted by obeyken “Ken Murphy” titled “Meh”. The article talks about the opposite of the Facebook “Like” Button. The Facebook “Meh” Button was inspired by the article posted on BoingBoing: Proposed Facebook icon for “meh” as opposed to “like”. Go to the PubNub Dev Center to learn how to use the API. PubNub Real-time works on all devices, including mobile phones. How did we create this button of “Meh”? We used PubNub’s API. Why build real-time apathy? It’s important to see exactly how many people don’t care without needing a page reload. When clicked, the number goes up on everyone’s computer screen, instantly. Add Facebook “Meh” Button Real-time “Meh”įacebook “Meh” Button is Real-time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |