Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    How to Share links on Facebook through QT?

    Mobile and Embedded
    2
    5
    4396
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      syedasadalibs03 last edited by

      I have tried Following Url ( "http://www.facebook.com/sharer.php?u="+"http://www.google.com"+&t=+"SearchEngine") but i have face the Problem of Java Scrip , that open the dialog of Yes and No
      after that, the Application is Crashed

      Although the Application share the URl on faceBook
      Through Simulator

      Thanks in Advance

      1 Reply Last reply Reply Quote 0
      • F
        fcrochik last edited by

        Please provide more details about your scenario?
        Is this a native (c++) application creating a http request?
        Are you using a html page within a webkit control?
        Is it a qml application?
        Or?

        If you are writing a c++ application and want to access facebook there is qt library that may help you. I have never tried but I know it exists and it is used on a maemo5 qt application.

        Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

        1 Reply Last reply Reply Quote 0
        • S
          syedasadalibs03 last edited by

          I am using the the QwebView and have facing the Problems of Javascript message i.e ("The Script on this page appears to have a problem do you want to stop the Script.
          Yes No")
          Finally the Memory full Message Occurs and the Application is Crashed.
          I have used the following code.

          ui->setupUi(this);
          QWebSettings::globalSettings()->setAttribute(QWebSettings::JavascriptEnabled, true);
          ui->webView->settings()->setAttribute(QWebSettings::JavascriptEnabled, true);
          ui->webView->settings()->setAttribute(QWebSettings::PluginsEnabled, true);

          QString urlString ="http://www.facebook.com/sharer.php?u=" + "http://www.google.com" + &t= + " SearchEngine" ;
          ui->webView->setUrl(QUrl(urlString) ) ;

          Thanks for your Reply.

          1 Reply Last reply Reply Quote 0
          • ?
            Guest last edited by

            are you sure the urlString has the right value? can you debug and find out

            1 Reply Last reply Reply Quote 0
            • F
              fcrochik last edited by

              [quote author="syedasadalibs03" date="1290753813"]
              QString urlString ="http://www.facebook.com/sharer.php?u=" + "http://www.google.com" + &t= + " SearchEngine" ;
              ui->webView->setUrl(QUrl(urlString) ) ;
              [/quote]

              The javascript shouldn't crash but neither should you use this string.
              You must encode, at least, the URL parameter (second string above).
              Try removing the "http://" from the second string and see if still crashes.

              Certified Specialist & Qt Ambassador <a href="http://www.crochik.com">Maemo, Meego, Symbian, Playbook, RaspberryPi, Desktop... Qt everywhere!</a>

              1 Reply Last reply Reply Quote 0
              • First post
                Last post