Forum Replies Created

Viewing 15 replies - 16 through 30 (of 40 total)
  • Thread Starter devitor

    (@devitor)

    Disregard on preview tool. It’s a Mac app. I’m running Linux Mint on the computer, so I can’t use the preview tool. I’ll send JSONS in a few hours.

    Thread Starter devitor

    (@devitor)

    Good afternoon Bradford.

    The only preview item I’m familiar with is the News App. Accessing News Publisher on the web there is no preview there for posts delivered via the plugin.

    I was wrong incidentally about WordPress not oEmbedding Facebook URLs. It does now. I likely need to stop hard-coding the SDK.

    I can send JSONs but would like to learn this preview tool first.

    Thread Starter devitor

    (@devitor)

    You’re welcome Canadianangelxo.

    JCBennett…. where you put it will depend on what theme you’re using and if you are using a child skin with the theme. On Thesis, it has to go in the head for Home, and Page – any place where you expect to display the embed code. You would need to find the equivalent locations for whichever theme you’re using.

    Thread Starter devitor

    (@devitor)

    I hard-coded Facebook’s SDK in the HTML head long ago – and I’m doing this on three sites. It works fine on all three of my sites. For it to work, the SDK has to be hard-coded into the header (it won’t work in the footer – I know Javascripts should generally go in the footer, but this one won’t work there) and the complete embed code provided by Facebook has to be loaded where you want it. You hard-code the SDK via your theme. Once that’s done, you can use Facebook embeds. You don’t need a plugin and should not rely on one – if the plugin is sunset and you have hundreds or thousands of posts with Facebook embeds, they’re all going to break.

    As the mods noted above, WordPress does not support Facebook embeds natively via non-hyperlinked URL on its own line. Use Facebook’s complete embed code.

    Text, photo and video embeds work fine; event invites fail for some reason, but I rarely post those. Events tend to be ephemeral posts anyway.

    Thread Starter devitor

    (@devitor)

    I run Google ads and I don’t use a plugin. I load the scripts right into a widget and drop them where I want them appear. The ad that appears center of my home page is hard-coded into the theme via a custom CSS file.

    Back to Facebook embeds. Facebook never answered my inquiry. But, it is clear to me, the new Facebook embed does require their SDK script to be loaded either on the page or hard-coded into the HTML head on every page on your site. I tested this on a raw HTML page. As the mods here said, it’s not a WordPress issue.

    Pinterest works the same way – you can embed a Pin or a Board, but you have to run a script – one time per page – or the embed absolutely will not work. So, basically Facebook has become like Pinterest in terms of embedding posts.

    I have my script hard-coded into the header and the impact on my site’s speed is negligible – but I’m also running a dedicated server with a GigE uplink and using CloudFlare and MaxCDN. I don’t run any resource-consuming widgets and I keep my plugin stack very minimal.

    Given the choice between coding the script into your header or using a plugin, I’d code the script into the head and forget about it. A plugin is going to load the script anyway plus have to run its own code – and then you’re running a non-standard configuration. If the plugin is sunset, you have to go back through all your posts where you used it and do them over again.

    If you don’t want to hardcode on every page, then keep the SDK in a notepad file and drop it in per post where you embed.

    However you do it, the embed requires the SDK or it won’t work.

    Thread Starter devitor

    (@devitor)

    As long as I put that script either in the theme or per story, the embed loads. Take the script out – the embed fails. Right now, I have the embed for single posts and pages – but not the home page, since the home is only photos and excerpts.

    Thread Starter devitor

    (@devitor)

    I have contacted Facebook, but they have not responded to my support request.

    The script can be inserted on a per-story basis – in the HTML at the top of the page – but that requires keeping it in a text file and remembering to drop it in each time…but that saves you from having to load it into the theme and having it execute on each page load.

    Thread Starter devitor

    (@devitor)

    I solved it….I can’t speak for Joomla, Drupal, etc. but here is how the new FB embed works with WordPress.

    You must put this script…

    <script>window.fbAsyncInit = function() {
      FB.init({
        xfbml      : true,
        version    : 'v2.3'
      });
      }; (function(d, s, id){
        var js, fjs = d.getElementsByTagName(s)[0];
        if (d.getElementById(id)) {return;}
        js = d.createElement(s); js.id = id;
        js.src = "//connect.facebook.net/en_US/sdk.js";
        fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));</script>

    In the HEADER for your Pages and Single Post template on your Theme….or you can manually put it in HTML on your post. Generally, JavaScripts should be loaded in the footer, because head loading slows the server down, but with this script it will fail in the footer. It must be in the head.

    I have placed the script in my theme template and if you go to the March 24th post above, it now works correctly.

    You do not need a plugin for Facebook embeds. Load the JDK script as described above.

    Thread Starter devitor

    (@devitor)

    James,

    Thank you for clarifying and explaining that. Per your recommendation, I have just contacted Facebook. I would like to leave this open since it is a matter of how their embed code interacts with WordPress.

    Thread Starter devitor

    (@devitor)

    If you look at this post:

    https://us4palin.com/happy-77th-birthday-chuck-heath-sr/

    I embedded the Facebook and it shows post by and that’s it. This was on March 24 when the problem started.

    Now…if we go to this post….

    https://us4palin.com/bristol-palin-dakota-meyer-engaged/

    All the Facebook embeds work just fine. This is March 14.

    I’m getting the embeds straight from Facebook. I copy the code and paste it in text / html mode.

    On the failed posts, I also tried the URL on the blank line – with a clean line above and below – and it would not even embed.

    Facebook changed their API.

    Here’s the code for the post that failed….

    <div id="fb-root"></div><script>(function(d, s, id) {  var js, fjs = d.getElementsByTagName(s)[0];  if (d.getElementById(id)) return;  js = d.createElement(s); js.id = id;  js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";  fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script><div class="fb-post" data-href="https://www.facebook.com/sarahpalin/posts/10153196675008588" data-width="466"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/sarahpalin/posts/10153196675008588">Post</a> by <a href="https://www.facebook.com/sarahpalin">Sarah Palin</a>.</div></div>

    Here’s code from the first embed on the March 14 post that worked…

    <div id="fb-root"></div><script>(function(d, s, id) {  var js, fjs = d.getElementsByTagName(s)[0];  if (d.getElementById(id)) return;  js = d.createElement(s); js.id = id;  js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";  fjs.parentNode.insertBefore(js, fjs);}(document, 'script', 'facebook-jssdk'));</script><div class="fb-post" data-href="https://www.facebook.com/SgtDakotaMeyer/posts/928241257215716" data-width="466"><div class="fb-xfbml-parse-ignore"><a href="https://www.facebook.com/SgtDakotaMeyer/posts/928241257215716">Post</a> by <a href="https://www.facebook.com/SgtDakotaMeyer">Dakota Meyer</a>.</div></div>

    I tested a new embed in an unpublished post and previewed and it’s still failing out.

    My competition has started using plugins to kludge the embeds with proprietary shortcodes. I don’t want to go there when WordPress was supporting these embeds native without the need for a plugin.

    Thread Starter devitor

    (@devitor)

    DevinEmily,

    I had two Windows machines here before I moved one to Linux and it was happening on both of them.

    Currently, the problem affects Firefox on ALL OS’s except for a live Linux CD/DVD/USB and it affects Chrome on Windows.

    Chrome on IOS works;
    Chrome/Chromium on Linux works.
    Safari IOS and Windows works.
    MSIE works.

    Thread Starter devitor

    (@devitor)

    DevineEmily,

    I checked just now after publishing a story. No change in the situation re: Share Counters. Firefox fails on installed Linux and Windows. It works on Linux Live CDs/Dvd/USB. Safari works all platforms. Chrome works only on iOS. MSIE works.

    [Moderator Note: No bumping, thank you.]

    Thread Starter devitor

    (@devitor)

    Devinemily,

    Shaareholic is back on for our Monday (Memorial Day) troubleshooting.

    Thread Starter devitor

    (@devitor)

    Monday, it is. I’ll re-activate it before I retire for the night on Sunday.

    Thread Starter devitor

    (@devitor)

    What would be the timeframe you would need? 24 hours, 48, 72? I want to do it during a relatively quiet time.

Viewing 15 replies - 16 through 30 (of 40 total)