WordPress.org

Ready to get started?Download WordPress

Forums

WPGPlus
[resolved] Failing for German users (66 posts)

  1. ariherzog
    Member
    Posted 2 years ago #

    I upgraded to 0.7. Same as before: Post publishes, but no publish on G+. (I assume it should be automatic.)

    Debug data:

    2012-02-19 17:37:26 : publish_to_gplus running, included wpgplus.php
    2012-02-19 17:37:26 : publish_to_gplus running, postID is 7881
    2012-02-19 17:37:26 : wgplus_safe_post_google running, post_id is 7881
    2012-02-19 17:37:26 : wgplus_safe_post_google running, username is xxx
    password is yyy
    2012-02-19 17:37:30 : login data posted
    2012-02-19 17:37:30 : status code was 200
    2012-02-19 17:37:30 : wgplus_safe_post_google running,  past log in
    2012-02-19 17:37:35 : Getting form for posting
    2012-02-19 17:37:36 : Got form, status was 200
    2012-02-19 17:37:36 : and base url is https://m.google.com/ServiceLogin
    2012-02-19 17:37:37 : Posted form, status was 404
    2012-02-19 17:37:42 : wgplus_safe_post_google running,  past update
    2012-02-19 17:37:42 : publish_to_gplus done running
  2. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    @herbert - Progress!

    When I look at the body of the response, though it is German:

    Nutzungsbedingungen f�r mobile Google-Dienste
    Indem Sie auf "Akzeptieren" tippen, stimmen Sie zu, dass Google Ihren Standort in diesem Produkt verwendet, und akzeptieren die Nutzungsbedingungen f�r mobile Google-Dienste.

    My google translate says this is something about accepting the terms of service for the mobile app.

    So WPGPlus is trying to post as you from https://m.google.com/ but because you haven't accepted that terms of service it is failing.

    Can you visit m.google.com and accept the terms of service there? Unfortunately, you may need to do it from a phone, or at least by using a web browser extension to let you fake your "user-agent" string into thinking it is a phone.

  3. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    @ari - note that one of the status codes there is a 404.

    When you are trying to post the form you're getting a 404 error from google.

    Do you have 2 step authorization enabled?

    http://lifehacker.com/5756977/set-up-googles-two+step-verification-now-for-seriously-enhanced-security-for-your-google-account

    Can you visit m.google.com and log in to plus from your phone?

  4. herb37
    Member
    Posted 2 years ago #

    @John,

    I have tested the publishing from my iPhone.
    With success. :-)

    But what is the reason why the publishing via my iMac failed.
    Regards
    Herb

  5. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    @herb - it should work from WordPress now as well.

    WPGPlus, the plugin, uses m.google.com to post to - it basically impersonates you and pretends to be a phone publishing to Google+ - this is all because Google+ doesn't yet have an API that allows publishing.

    The problem was that Google+ was presenting to the plugin an "acccept the terms of service" button which the plugin didn't know how to handle.

    I'm hoping that once Google knows your userid has accepted those terms, it will allow the plugin to publish.

  6. ariherzog
    Member
    Posted 2 years ago #

    I never had that 2-step verification set up. Seemed more trouble than needed. But did it now. Can see google on mobile fine.

    Same publishing routine. Same debug codes.

    2012-02-19 18:22:23 : publish_to_gplus running, included wpgplus.php
    2012-02-19 18:22:23 : publish_to_gplus running, postID is 7888
    2012-02-19 18:22:23 : wgplus_safe_post_google running, post_id is 7888
    2012-02-19 18:22:23 : wgplus_safe_post_google running, username is blahblah and password is blah blah
    2012-02-19 18:22:25 : login data posted
    2012-02-19 18:22:25 : status code was 200
    2012-02-19 18:22:25 : wgplus_safe_post_google running,  past log in
    2012-02-19 18:22:30 : Getting form for posting
    2012-02-19 18:22:31 : Got form, status was 200
    2012-02-19 18:22:32 : and base url is https://m.google.com/ServiceLogin
    2012-02-19 18:22:32 : Posted form, status was 404
    2012-02-19 18:22:37 : wgplus_safe_post_google running,  past update
    2012-02-19 18:22:37 : publish_to_gplus done running
  7. herb37
    Member
    Posted 2 years ago #

    @John,

    Many thanks. Now I can publish from macBook, iMac an even a Windows PC (Win7).

    There ist only one problem left

    mal sehen, was “nun”?

    I guess “ is the "
    But was was the secret? The "acccept the terms of service".

    Regards
    Herb

  8. herb37
    Member
    Posted 2 years ago #

    “nun”?

    I guess is the "

    That is the problem left.
    Herb

  9. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    @ari - I wasn't asking you to set up 2-factor authentication, in fact having it on will likely cause WPGPlus to fail.

    What's happening in your case is something different than what was happening for herb37.

    Note the line that says:

    2012-02-19 18:22:32 : and base url is https://m.google.com/ServiceLogin

    Whereas in my case that base url is something more like this:

    https://m.google.com/app/plus/x/1l9exn92wmiuh/

    Though the actual url changes each time - the point being you're still stuck at servicelogin not inside the app.

    Have you actually logged in to the m.google.com site from your phone or just viewed it without logging in?

    @herb37 - since this thread is getting so long and I'm not sure I understand the issue, can you start a new thread for the "nun" quotes mark problem?

  10. ariherzog
    Member
    Posted 2 years ago #

    Updates:

    First: I can log in and move around my Google Mobile services from my mobile device.

    Second: I installed your new development version but same story when publishing in that it doesn't post to G+.

    Here is the debug file (and inserted blah in security places):

    2012-02-19 23:33:04 : publish_to_gplus running, included wpgplus.php
    2012-02-19 23:33:04 : publish_to_gplus running, postID is 7895
    2012-02-19 23:33:04 : wgplus_safe_post_google running, post_id is 7895
    2012-02-19 23:33:04 : wgplus_safe_post_google running, username is blah
    password is blah
    2012-02-19 23:33:06 : login data posted
    2012-02-19 23:33:06 : status code was 200
    2012-02-19 23:33:06 : wgplus_safe_post_google running,  past log in
    2012-02-19 23:33:11 : Getting form for posting
    2012-02-19 23:33:11 : Post text is Test of dev version.
    
    2012-02-19 23:33:12 : Got form, status was 200
    2012-02-19 23:33:12 : Response was:
    <?xml version="1.0" encoding="UTF-8"?>
      <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
      <title>Sign in</title>
      </head>
      <body dir="ltr">
    <img src='https://accounts.google.com/google_white.gif'
         border="0"
         align="bottom"
         alt="Google" />
      <div class="fieldContent"
           style="background-color:#e8eefa;">
      <b>Google+</b>
      <br />
      <font size="-1">Sign in with your Google Account</font>
      <br />
    <form id="gaia_loginform"
          action="https://accounts.google.com/ServiceLoginAuth"
          method="post" >
      <input type="hidden" name="continue" id="continue"
               value="https://m.google.com/app/plus/x/?v=composeamp;group=m1camp;hideloc=1amp;login=1" />
      <input type="hidden" name="followup" id="followup"
               value="https://m.google.com/app/plus/x/?v=composeamp;group=m1camp;hideloc=1amp;login=1" />
      <input type="hidden" name="service" id="service"
               value="webupdates" />
      <input type="hidden" name="dsh" id="dsh"
               value="blah" />
      <input type="hidden" name="btmpl" id="btmpl"
               value="mobile_tier2" />
    <input type="hidden" name="timeStmp" id="timeStmp"
           value=''/>
    <input type="hidden" name="secTok" id="secTok"
           value=''/>
      <input type="hidden"
             name="GALX"
             value="blah" />
    <span class="gaia le lbl">Email:</span>
      <br />
    <input type="text" name="Email"
           id="Email" size="18"
           value=""  class="gaia le val" />
      <br />
      <span style="color: #666666; font-size: 75%"
            class="gaia le val">ex: pat@example.com</span>
    <br />
    <span class="gaia le lbl">Password:</span>
    <br />
    <input type="password"
           size="18"
           name="Passwd" id="Passwd" class="gaia le val" autocomplete="off" />
    <div align="left">
      <input type="submit" class="gaia le button" name="signIn"
             value="Sign in" />
    </div>
    </form>
      </div>
      <b>Don't have a Google Account?</b>
      <br />
      <b><a href="https://accounts.google.com/SignUpWidget?service=webupdatescontinue=https%3A%2F%2Fm.google.com%2Fapp%2Fplus%2Fx%2F%3Fv%3Dcompose%26group%3Dm1c%26hideloc%3D1%26login%3D1followup=https%3A%2F%2Fm.google.com%2Fapp%2Fplus%2Fx%2F%3Fv%3Dcompose%26group%3Dm1c%26hideloc%3D1%26login%3D1btmpl=mobile_tier2">Create an account now</a></b>
      <br />
    <p class="footer">
     <font size="-1">
      copy;2012 Google
      - <a href="http://m.google.com/m/help?hl=en" id="mobileFooterHelpLink">Help</a>
      - <a href="http://m.google.com/tospage?hl=en" id="mobileFooterTosLink">Terms of Service</a>
      </font>
    </p>
      </body>
    </html>
    
    2012-02-19 23:33:12 : and base url is https://m.google.com/ServiceLogin
    2012-02-19 23:33:12 : Posted form, status was 404
    2012-02-19 23:33:12 : Post text was Test of dev version.
    
    2012-02-19 23:33:12 : Header of response was Array
    2012-02-19 23:33:12 : Body was <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Error
    404
    (Not Found)!!1</title>
    <style type="text/css">
            blahblahblah style codes here blahblahblah
          </style></head>
    <body><a href="//www.google.com/" id="g"><img src="//www.google.com/images/logo_sm.gif" alt="Google"></a>
    <p><b>404.</b>
    <ins>That's an error.</ins></p>
    <p>The requested URL <code>/ServiceLogin</code> was not found on this server.
    <ins>That's all we know.</ins></p></body></html>
    2012-02-19 23:33:17 : wgplus_safe_post_google running,  past update
    2012-02-19 23:33:17 : publish_to_gplus done running

    The question remains the same: Why is this pointing to the base url of https://m.google.com/ServiceLogin

  11. ariherzog
    Member
    Posted 2 years ago #

    Question: Should I see something listed in the list of apps and services etc authorized to connect to my Google account?

  12. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    No, you should not see anything listed in authorized.

    Google provides no API for publishing to Google+, so I'm working around that by using the mobile interface.

    For some reason, your login to google+ is failing. Are you certain the password and email address you've provided are the correct ones for logging in to your google+ account?

    Did you visit m.google.com on a phone / mobile device, login, and make sure the terms of service has been accepted?

  13. ariherzog
    Member
    Posted 2 years ago #

    Yes, my email/pass is correct.
    Yes, I can visit m.google.com.
    And, yes, the terms are accepted by default when logging in.

  14. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    @ari - when you visit m.google.com, are you doing so from a mobile device? And when you visit, you can log in and post?

    Google is sensing user agent and will send different responses to different client types. But WPGPlus impersonates a mobile client - so I don't know why it would get a different experience than you do.

    Did you turn off 2-factor authorization?

    I'm not sure what else to check at this point - clearly cURL is not able to log you in, as the form it gets is not the update status form but a "Log in with your google account" form.

    Why it isn't able to log you in I don't know as it isn't showing an error page.

    I suppose I could add debugging further up stream where the login credentials get submitted - I just added yet another debug version if you are interested in trying futher - you can email me the debug.txt it outputs.

    There must be something in the Google+ response that might indicate why login is not working

  15. ariherzog
    Member
    Posted 2 years ago #

    Yes I can visit m.google.com from my android and I can post to my feed there fine. I did turn off the 2-part authorization.

    I reinstalled the dev version. Debugger is telling me the script was presented with a verification screen, not recognizing the device or whatever accessing it. But... first, I had already turned off the 2-part verification and second, I can post to g+ on my mobile browser fine.

    Weird.

  16. ariherzog
    Member
    Posted 2 years ago #

    I wonder if the problem lies in curl itself? Maybe because it's not my computer accessing but a remote server IP?

  17. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    It is definitely not your computer accessing Google+. cURL runs on the server where your WordPress blog (and thus the wpgplus plugin) is installed.

    But it isn't clear why that should make a difference - it works fine for me on two different blogs, and I've had lots of others tell me it works for them too.

    In the development version I posted last night, the debug should capture the response from google at each step - can you post what precisely it says in the debug file where it is not recognizing the device?

    Have you set something in Google+ to only allow certain devices? I've never edited my Google+ security settings.

  18. Sparky73
    Member
    Posted 2 years ago #

    Hello all,

    Firstly, Many thanks for Great efforts with WPGPlus plugin.

    Question:

    Is it possible use Plugin for G+ Group? I would like sending messages to the G+ Group that I have been created as well as my personal G+ account?

    What I need to change in Plugin and where?

    Thanks for help in advance.

    With bets regards

    SPARKY

  19. Sparky73
    Member
    Posted 2 years ago #

    Finally PLUGIN doesn't working for me. The ERROR is follow:

    Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set in /home/xyz/hom/wp-content/plugins/wpgplus/gplus.php on line 63

    Fatal error: Call to a member function getAttribute() on a non-object in /home/xyz/hom/wp-content/plugins/wpgplus/gplus.php on line 79

  20. lukapusic
    Member
    Posted 2 years ago #

    Hello!

    First of all, I'd like to thank John for this cool plugin that is based on my PHP Google+ updater.

    @Sparky73
    You are running PHP in safe mode, which can be turned off in php.ini if you are permitted to change it on the server. The script currently requires safe mode to be OFF, which is default.

    And, the answer to your previous question is Yes, you can post to specific groups, but you will have to modify the source code near this comment:

    /* group=m1c is 'your circles', group=b0 is 'public' */

    I will try to improve my code as soon as I find some time :)

  21. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    Hello Luka!

    Thanks for building the Google+ update script.

    How do you tell what the group codes are for other groups? I'd love to make the group target configurable.

    I'd also love to find a way to parse links, like the regular desktop web browser version of G+ does - you put in a link and it checks that link, pulling out metadata.

  22. Marcuss
    Member
    Posted 2 years ago #

    Für all jene, bei denen die debug.txt wie bei Ariherzogs Kommentar aussieht, habe ich eine Lösung:

    Den Link aus der Zeile '2012-02-19 18:22:32 : and base url is...' in den Browser eingeben und dann die Nutzungsbedingungen bestätigen.

    Dann klappt die Veröffentlichung auf g+
    ------------------
    For all those, with which the file debug.txt looks as with ariherzogs Comment has I a solution

    The URL from the line '2012-02-19 18:22: 32: and base URL is…' enter into the browser and the use conditions confirm.

    Then the publication folds on g+

  23. CluelessVisitor
    Member
    Posted 2 years ago #

    I have another problem with the plugin, though I have not idea whether that's because I'm a German user or something else.

    When I activated the plugin for the first time, it more or less shut down my WordPress-account and prevented me from logging in again.
    Instead, I got half a dozen warnings comparable to the ones quoted by Mr. Eckman in the opening post

    "Warning: Cannot modify header information - headers already sent by (output started at ..../blog/wordpress/wp-content/plugins/wpgplus/gplus.php:55) in ..../blog/wordpress/wp-includes/pluggable.php on line 866"

    only this time the bone of contention was another WP-plugin, more specifically the SEO-all-in-one-pack. I had to manually remove it (the SEO-pack, not the wpgplus-plugin - the removal of this tool didn't help at all) from the plugin-folder before I could log in again and was able to deactivate the wpg+p.

    But since I haven't been able to verfiy so far whether the plugin works alt all, I reactivated it at the expense of SEOaiop. Next time I blog something I'll see if it works at all or if other problems arise.

    However, if it does, I have a second question: Is it a known problem that SEOaiop apparently doesn't mesh with wpg+p or is just me?
    It might have something to do with me forgetting to link my wordpress acount with my g+account the first time I activated the wpg+p, thus provoking that kind of error I encountered - I doubt it, but am sufficiently clueless (hence the name) to not be able to make an educated guess on that subject.

    Thanks in advance for any (helpful) answer!

  24. CluelessVisitor
    Member
    Posted 2 years ago #

    "But since I haven't been able to verfiy so far whether the plugin works alt all, I reactivated it at the expense of SEOaiop. Next time I blog something I'll see if it works at all or if other problems arise."

    Update: We tried to post a new entry on our blog, but it didn't get published on G+ either; my colleague told me it was some kind of "php-problem".

    I tried to post it as a link (keep in mind, the g+publish-function was activated) in an independet comment, but to no avail - it didn't work either.

    Is it really intentional that it is so fiendishly complicated to quote a simply stupid blog post on google+ or am I just to stupid to see the solution?

  25. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    @CluelessVisitor

    I will need considerably more detail than just "some kind of php problem" to be able to help.

    The reason it is fiendishly difficult here is because Google have not published any read/write API to Google+, so we have to impersonate the user and do the post via curl - there are many many different kinds of configurations for that, some of which fail.

    When you say you tried to post it as a link in an independent comment, I don't know that that means - you wrote a second blog post and published that?

  26. Ali Sajjad
    Member
    Posted 2 years ago #

    Hello John !
    I use WordPress-Persian , I did all of settings ( set email+password and select yes in excerpt box)
    but my post can not to share my G+...
    what is should to do??
    site for check : p30af
    thanks

  27. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    Is your Google+ set for dual-factor authentication?

    Have you ever logged in to google+ on your mobile?

  28. Ali Sajjad
    Member
    Posted 2 years ago #

    Is your Google+ set for dual-factor authentication?

    Have you ever logged in to google+ on your mobile?

    Yes , I am always login in my Gmail and G +
    If I want share my new post to G + I must log out form Google ?

  29. Ali Sajjad
    Member
    Posted 2 years ago #

    Dear John :
    What is dual-factor? for this plguin must enable? how I can enable?
    I must login in G+ for use this plugin or no?
    thanks

  30. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    Dual-factor authentication isn't a WordPress thing, it's a Google+ thing.

    See Advanced Sign-in Security

    If you have this "2 step verification" enabled in your google account wpgplus will fail.

    Have you looked at what is in the debug file in your wpgplus directory?

    The plugin tries to log you in to GPlus itself, via Curl, so it shouldn't matter if you are logged in to GPlus in your browser or not

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags