WordPress.org

Ready to get started?Download WordPress

Forums

WPBook
My post links are https... what did I do wrong? (13 posts)

  1. dariusdunlap
    Member
    Posted 3 years ago #

    When I post on my blog, the posts link correctly to my wall on my Facebook account. But the link back to my blog is "https" (so people get warnings about my self-signed security certificate.)

    Is there something I did wrong in setting up WPBook? What can I change to make it use non-secure URLs?

    When I post, I do use the secure interface. Is that somehow related to WPBook picking up the secure URL?

  2. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    What's the url of your blog?

    WPBook creates a filtered version of the permalink using the existing WordPress permalink - are all your permalinks HTTPS?

  3. dariusdunlap
    Member
    Posted 3 years ago #

    http://dunlaps.net/darius is the URL of the blog.

    The permalinks are not https:// is you start at the regular URL. but they are if you start at the secure URL. (https://dunlaps.net/darius - you'll get a warning because of my self-signed security certificates)

    Thanks!

  4. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    Do you have "promote external permalinks" on?

    publish_to_facebook.php gets the permalink thusly:

    if($wpbook_promote_external) {
          $my_permalink = get_permalink($post_ID);
        } else {
          $my_permalink = wpbook_always_filter_postlink(get_permalink($post_ID));
        }

    It may be that indeed this runs in an https environment if you are in https when you publish the post?

    I see that your tried to post one NOT using the https for the admin side - did it work?

  5. dariusdunlap
    Member
    Posted 3 years ago #

    I'm guessing you're right, John. My most recent test post, from a non-secure admin interface, came through as regular http://...

    I'm also going to see what it looks like when I turn off "Use external permalinks on Walls".

    d.

  6. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    We could also add code to filter out the https - just needs to look at the first five characters of the permalink and if they are https replace them with http

    Not sure if there's a better way to get the permlink parts?

  7. dariusdunlap
    Member
    Posted 3 years ago #

    Interesting bug, John.

    Turning off "Use external permalinks on Walls" basically fixes the problem. The title link now takes people to my "DariusBlog" app page on Facebook, and then the link from there to "View Post on Darius", takes them to the non-secure link.

    Check it out for yourself:

    https://www.facebook.com/dariusdunlap

    Is the code for generating the "View Post on Darius" link somehow smarter or different?

  8. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    Not any smarter or different, just called in a different context. Call the get_permalink() inside an https session and you get https permalinks - call it in an http session and you get http permalinks.

    We'll have to add a filter to trap https links in the publish_to_facebook code

    Should be in next release or maybe the one after - we've got a 2.0.10 we're just trying to get tested and out the door - not sure we'll get in that one

  9. dariusdunlap
    Member
    Posted 3 years ago #

    New problem. When posting from marsedit, the link to the facebook app comes through at "dariusblogs" instead of "dariusblog". how weird is that?

    d.

  10. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    Hmm. So Mars Edit uses the XMLRPC client, yes?

    I've no idea - is this reproducible? Anyone else using MarsEdit?

  11. dariusdunlap
    Member
    Posted 3 years ago #

    I tried recreating the entire integration, re-install of WPBook, new facebook App, setup everything from scratch, and got the same problem... well, this time it was
    "darius-blogs" when it should have been "darius-blog".

    I've got Marsedit using the XMLRPC interface, yes.

    Wierd, eh?

    d.

  12. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    So your blog itself outside FB lives at http://dunlaps.net/darius

    Your facebook app lives at http://apps.facebook.com/dariusblog ?

    Looking at that app, it doesn't look to my like WPBook is being triggered - but maybe that's because you're still testing?

    And when you write posts using the http interface directly in WordPress, they work fine, but when you write posts using Mars Edit, they have the wrong permalinks?

    Where are you seeing the permalinks with the wrong url - in your wall postings, in a tab, or in the application canvas itself?

  13. dariusdunlap
    Member
    Posted 3 years ago #

    Yes, the http: vs. https: problem is confirmed. And the addition of a "s" to dariusblog in the facebook app permalink (http://apps.facebook.com/dariusblogs/PERMALINK ) is also confirmed.

    I turned it all off and removed WPBook after installing everything again from scratch and having the same problem. (The second time I put the facebook app at http://apps.facebook.com/darius-blog)

    If you have any suggestions, I'm happy to help troubleshoot. -)

    d.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic