×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Oct 2010
    Posts
    31

    QtWebKit and OAuth doesn't work!

    I've recently found a very disappointing and annoying bug with QWebView element which is used to login to facebook (or any other social network with the same login system).

    When user is redirected to facebook he has to enter his login and password on the site. But for some reason keyboard doesn't appear for the login ! It's only possible to enter password. No matter how much you click on text field for login no keyboard appears.

    Everything is ok in Qt simulator, I've also tested on N900 (maemo), but there is no way to enter login on Symbian device without keyboard (because it doesn't appear). My test phone was Nokia 5230.

    This is not just facebook issue. I've also tested with Vkontakte network (№1 in Russia), same thing! No way to enter login. I bet it's gonna be the same for most of the sites using OAuth.

    Has anyone tried using QWebView to login to facebook on Symbian?

    I'm using Qt. 4.6.3.
    Nokia 5230 has latest firmware v40.0.3.

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: QtWebKit and OAuth doesn't work!

    hello Pavel.Rusin,

    I have used QtWebKit to consume the Graph APIs and it works excellent, i have never faced that sort of problem. But i have most used that on Symbian^3 devices and 5230 here is different, so i will advice you if can try that on some other devices and confirm the same.

    Regards,

  3. #3
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: QtWebKit and OAuth doesn't work!

    Facebook uses OAuth 2.0 draft protocol which is not supported by Qt (yet) http://bugreports.qt.nokia.com/browse/QTBUG-6229 .

    For reference http://developers.facebook.com/docs/authentication/

    -Janne
    http://twitter.com/#!/koshui

  4. #4
    Registered User
    Join Date
    Oct 2010
    Posts
    31

    Re: QtWebKit and OAuth doesn't work!

    Quote Originally Posted by jakoskin View Post
    Facebook uses OAuth 2.0 draft protocol which is not supported by Qt (yet) http://bugreports.qt.nokia.com/browse/QTBUG-6229 .

    For reference http://developers.facebook.com/docs/authentication/

    -Janne
    Probably you didn't understand this issue.

    The bug you mentioned is about adding new functionality to support the OAuth 2.0 protocol natively. That would be nice, but this kind of functionality is not required to use OAuth 2.0 through web browser, you only need to redirect user to login page where user is prompted to enter his login/password. If a user successfully logs in then it's possible to get all authorization token details from new URL.

    My issue is that browser doesn't fully recognize text filed where user has to enter login. Text cursor appears but there is no way to show on-screen keyboard to type there. At the same time everything works for the second text field (password) which is right under login text field. This bug makes it impossible for user to login. Even copy-paste doesn't work for the first text field.

  5. #5
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: QtWebKit and OAuth doesn't work!

    That would be focus issue with input field element being the node in focus and FEP VKB. Those were fixed long time ago...
    I just entered my name on Facebook using QtWebkit2.1 and Qt4.7.2 on N8 to see that the fixes still work and had no issues.

    EDIT: I see Skumar answered to this on wrong thread http://discussion.forum.nokia.com/fo...l=1#post831487 ...
    http://bugreports.qt.nokia.com/browse/QTBUG-10331 is your issue and well looks like the bug had been assigned to me.

    -Janne
    Last edited by jakoskin; 2011-04-04 at 14:47.
    http://twitter.com/#!/koshui

  6. #6
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: QtWebKit and OAuth doesn't work!

    Hi Pavel
    try using display=wap
    instead of display=touch
    and also call setTextSizeMultiplier(1.2) on QWebView instance
    I have experimented the same situation you describe on N97 , while it works better on N8

    As you probably know Facebook Login page text input elements looks very small in dimension and i suppose that makes very difficult to "click" it

    Also i realized that while using display=touch ,for some reason setTextSizeMultiplier doesnt have effect on Facebook page, while it does when using display="wap"

    anyway that does not explain why password can be clicked while username seems unable to be activated

    btw , also pressing OK can be a nightmare

    also be aware ...the drawback is that using "display=wap", users will not be able to login by PhoneNumber
    Last edited by lucarocchi; 2011-04-04 at 21:09.
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  7. #7
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: QtWebKit and OAuth doesn't work!

    Quote Originally Posted by jakoskin View Post
    That would be focus issue with input field element being the node in focus and FEP VKB. Those were fixed long time ago...
    I just entered my name on Facebook using QtWebkit2.1 and Qt4.7.2 on N8 to see that the fixes still work and had no issues.

    EDIT: I see Skumar answered to this on wrong thread http://discussion.forum.nokia.com/fo...l=1#post831487 ...
    http://bugreports.qt.nokia.com/browse/QTBUG-10331 is your issue and well looks like the bug had been assigned to me.

    -Janne
    i have checked both form depend on touch/wap
    if touch , the form contains type="email"
    if wap type="text"
    So , as bug reported , type="email" doesn't work ...

    https://graph.facebook.com/oauth/aut...x,manage_pages

    <input type="email" value="xxx" class="login_form_field" name="email" gtbfieldid="1">
    https://graph.facebook.com/oauth/aut...x,manage_pages

    <input type="text" value="xxx" name="email" class="input" gtbfieldid="1">
    Pavel, by follow this link
    you can code your app to use display=touch , that is better, otherwise if !Symbian^3 switch to display=wap
    Last edited by lucarocchi; 2011-04-04 at 21:44.
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

  8. #8
    Registered User
    Join Date
    Oct 2010
    Posts
    31

    Re: QtWebKit and OAuth doesn't work!

    Thanks lucarocchi.

    I've used solution from skumar_rao to explicitly override email type for input element.

    Code:
        connect ( iWebView.page(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool)));
       ...
    
       loadFinished(bool ok)
          {
                if (!ok)
                {
                    return;
                }
    
                QWebFrame* frame = m_WebView->page()->mainFrame();
                if (frame!=NULL)
                {
                    QWebElementCollection collection = frame->findAllElements("input[type=email]");
                    foreach (QWebElement element, collection)
                    {
                        element.setAttribute("type", "text");
                    }
                }
            }

  9. #9
    Registered User
    Join Date
    May 2009
    Location
    Rome
    Posts
    268

    Re: QtWebKit and OAuth doesn't work!

    Quote Originally Posted by Pavel.Rusin View Post
    Thanks lucarocchi.

    I've used solution from skumar_rao to explicitly override email type for input element.

    Code:
        connect ( iWebView.page(), SIGNAL(loadFinished(bool)), this, SLOT(loadFinished(bool)));
       ...
    
       loadFinished(bool ok)
          {
                if (!ok)
                {
                    return;
                }
    
                QWebFrame* frame = m_WebView->page()->mainFrame();
                if (frame!=NULL)
                {
                    QWebElementCollection collection = frame->findAllElements("input[type=email]");
                    foreach (QWebElement element, collection)
                    {
                        element.setAttribute("type", "text");
                    }
                }
            }
    Cool , i miss that ! that's the fix ,really better ... i m going to change my code right now, thx to skumar_rao
    Last edited by lucarocchi; 2011-04-06 at 19:06.
    Keep it simple, stupid
    borg - http://store.ovi.com/content/116105

Similar Threads

  1. [moved] N78 and Garmin Mobile XT doesn't work.
    By eliasar123 in forum General Development Questions
    Replies: 5
    Last Post: 2008-06-28, 00:36
  2. Game Sounds and effects doesn't work on n95
    By atilacorreiacunha in forum Mobile Java Media (Graphics & Sounds)
    Replies: 2
    Last Post: 2008-04-03, 16:00
  3. 3ed phone and receiving sms doesn't work
    By Robert111 in forum Symbian
    Replies: 0
    Last Post: 2007-10-12, 18:32
  4. HDW-2 and Tungsten via BT simultaneously doesn't work
    By CharlesL in forum Bluetooth Technology
    Replies: 1
    Last Post: 2003-05-20, 20:03

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×