Support » Plugin: WPBook » [Plugin: WPBook] bad post header format on facebook

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author John Eckman

    (@johneckman)

    luisj – can you point me to your blog outside facebook, and your app inside facebook?

    Hello johneckman.
    of course.
    blog outside facebook: http://www.profelectro.info/
    app inside facebook: http://apps.facebook.com/ligadosblog/
    thanks for your attention.
    Luis J.

    Plugin Author John Eckman

    (@johneckman)

    What are you using to generate the little post-date calendar that shows up in front of the title of each post?

    The way WPBook works is by outputting your blog posts in a FB-specific theme (found in wpbook/theme/) when called inside FB.

    It seems that some of your javascript-driven behaviors are not working with that theme – not sure why.

    Have you set a custom header/footer (see the advanced options at the bottom of the WordPress settings for WPBook)?

    Could it have something to do with Google adsense ads?
    or with the the portuguese language, with all of its accents?
    I solved the question of the date in the header, which was wrong formatted too.
    But the post-post header I can’t achieve a solution 🙁
    I put that options in the footer, but the problem remains.
    Now I´ve customized the header and the footer in the wpbook, but it only added the customized header and footer, nothing more. I retired it again.
    Thanks for your help.

    Oh, and the the little post-date calendar that shows up in front of the title of each post, is made in the css file, it´s only a gif image above the date generated by the wordpress blog theme. It isn´t generated by javascript.

    Plugin Author John Eckman

    (@johneckman)

    While I don’t have any Portuguese blogs to test on, I think it is a JavaScript issue.

    The dates look fine now.

    What’s happening further down the page is this html code (view frame source on your facebook blog page to see it):


    <p><span class="wpbook_share_button"><a onclick="window.open('http://www.facebook.com/sharer.php?s=100&p[title]=Metrologia+%26%238211%3B+Medi%C3%A7%C3%A3o+de+Temperaturas+%2F+Termopares+%28Parte+1%2F5%29&p[summary]=<script type="text/javascript">embaPub="db85e2590b6109813dafa101ceb2faeb";</script><script type="text/javascript" src="http://widget.embedarticle.com/javascripts/embed_cp.js"></script>Medi%C3%A7%C3%A3o+de+Temperatura%0AIntrodu%C3%A7%C3%A3o%0AA+temperatura+%C3%A9+uma+das+grandezas+mais+medidas+na+ind%C3%BAstria.+Basta+pensarmos+nas+ind%C3%BAstrias+do+a%C3%A7o%2C+do+vidro%2C+do+pl%C3%A1stico%2C+de+todo+e+qualquer+produto+met%C3%A1lico%2C+para+concluirmos+que+se+tratam+de+processos+cuja+qualidade+depende+de+um+controlo+rigoroso+da+temperatura+de+opera%C3%A7%C3%A3o.%0AOs+instrumentos+mais+utilizados+para+a+medi%C3%A7%C3%A3o+precisa+da+temperatura+%5B...%5D&p[url]=http%3A%2F%2Fapps.facebook.com%2Fligadosblog%2F%2F%3Fp%3D2538','sharer','toolbar=0,status=0,width=626,height=436'); return false;" class="share" title="Send this to friends or post it on your profile.">Share This Post</a></span><span class="wpbook_external_post"><a href="http://www.profelectro.info/?p=2538" title="View this post outside Facebook at ligados à corrente">View post on ligados à corrente</a></span></p></div></div>

    You can see that when WPBook tries to put in the FB share button, it tries to add a variable for the p[summary] which Facebook will use to populate the Share popup. It does this by calling:

    urlencode(get_the_excerpt());

    But your blog returns, for get_the_excerpt, this:


    <script type="text/javascript">embaPub="db85e2590b6109813dafa101ceb2faeb";</script><script type="text/javascript" src="http://widget.embedarticle.com/javascripts/embed_cp.js"></script>Medi%C3%A7%C3%A3o+de+Temperatura%0AIntrodu%C3%A7%C3%A3o%0AA+temperatura+%C3%A9+uma+das+grandezas+mais+medidas+na+ind%C3%BAstria.+Basta+pensarmos+nas+ind%C3%BAstrias+do+a%C3%A7o%2C+do+vidro%2C+do+pl%C3%A1stico%2C+de+todo+e+qualquer+produto+met%C3%A1lico%2C+para+concluirmos+que+se+tratam+de+processos+cuja+qualidade+depende+de+um+controlo+rigoroso+da+temperatura+de+opera%C3%A7%C3%A3o.%0AOs+instrumentos+mais+utilizados+para+a+medi%C3%A7%C3%A3o+precisa+da+temperatura+%5B...%5D

    Which messes up the template.

    You could turn off the “share” links in the WPBook settings, which would make the theme work better.

    Or you could hack out the summary pieces at lines 277 and 278 of theme/index.php (in 2.0.1) but then the share button won’t have any summary.

    Basically WPBook isn’t prepared for script tags in the excerpt, at least as that impacts the share button – I’ll consider that a bug. Perhaps beyond just urlencoding the excerpt we also need to strip certain tags from it?

    Hello John.
    Thanks so much for your support.
    I think I understood all the picture.
    When I get the time I’ll try to fix it and then I’ll report the results here.
    Continue the excellent work.
    All the best.

    I think it´s ok now.
    I just elimiated the
    // echo ‘&p[summary]=’;
    // echo urlencode(get_the_excerpt());
    lines in your index.php file.
    No excerpt but… no problem.
    Thanks again.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WPBook] bad post header format on facebook’ is closed to new replies.