Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Facebook login on android
Forum Updated to NodeBB v4.3 + New Features

Facebook login on android

Scheduled Pinned Locked Moved Solved Mobile and Embedded
23 Posts 10 Posters 13.1k Views 1 Watching
  • 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.
  • J Offline
    J Offline
    julienw
    wrote on last edited by
    #13

    Haha, error reporting is "great" when it comes from android ^^

    I'm using the QML interface (I know you don't). So, I need to keep the activity from Qt, it's why I need to extends the QtActivity (and I will not have only facebook in native side)
    In addition, examples from digia about hangman (for paiment) and their notifications example extends the QtActivity too.
    So I don't think that it's bad ;)

    For the finish(), it was just the " xmlns:android" in the layout that is an error. I detected it by implementing a new application from Eclispe : it could give me error on UI where Qt don't.
    So, I could have something working too ;). I can login and use the Graph API to get what I need.

    The main issue for now is to keep the session open (access token is only for one hour). Do you know what we need to do? (like storing cookies in the app maybe)

    1 Reply Last reply
    0
    • T Offline
      T Offline
      the_scrabi
      wrote on last edited by
      #14

      Seams like we need to request a long live access token witch leasts for 60 days:
      https://developers.facebook.com/docs/facebook-login/access-tokens/#extending

      1 Reply Last reply
      0
      • T Offline
        T Offline
        the_scrabi
        wrote on last edited by
        #15

        I finally got it working !!!
        I was able to merge the Facebook SDK into my Android app, to get 60 day longterm accesstoken.
        If someone is interested please answer me, or write me a mail. Then I'll try to prepare the code so everyone can have it :)

        but despite its working, its not very nice.

        chears schabi

        V 1 Reply Last reply
        0
        • F Offline
          F Offline
          feldifux
          wrote on last edited by
          #16

          Nice work schabi, you can add a link to your code here in the forums if you like?

          Since a couple of days, we now also have a Facebook Qt 5 plugin ready for Android & iOS. You can have a look at the sample on github and the tutorials here:

          • "How to integrate Facebook into Qt 5 Apps":http://plugins.v-play.net/blog/2014/05/integrate-facebook-in-your-qt-5-apps/
          • "Tutorial & Sample Code for Facebook Login in Qt 5":http://plugins.v-play.net/blog/2014/06/how-to-benefit-from-facebook-login-in-your-qt-5-app/
          • "Facebook Plugin Overview":http://plugins.v-play.net/plugins/facebook/
          • "Facebook Plugin Documentation":http://plugins.v-play.net/doc/plugin-facebook/

          Founder of Felgo SDK - http://felgo.com/qt

          Felgo simplifies

          • Mobile App Dev with Qt esp. iOS & Android
          • Game Development with Qt

          What others say

          Felgo scored #1 in Cross-Platform App Development Tools Report - see why: https://goo.gl/rgp3rq

          1 Reply Last reply
          0
          • D Offline
            D Offline
            DonRico
            wrote on last edited by
            #17

            the_scrabi, I would really appreciate a working example to study. My desired result is to add Google Login to Qt Android app and the problem (missing webview) is fairly similar. Also could help me to resolve the Google maps integration issues.

            Another good exmaple to study is probably "Qt hangman ":http://blog.qt.digia.com/blog/2013/12/12/implementing-in-app-purchase-on-android/ since it implements android in-app purchasing an that can't be too different compared to what we need to achieve.

            1 Reply Last reply
            0
            • T Offline
              T Offline
              the_scrabi
              wrote on last edited by
              #18

              All right I'll try to get it ready the next days. But I need to apologise, it still has some problems, and I do this in my spare time. So it will take me a few days to get it working correctly.

              Also this is NOT using a Web login any more !!! Since you could only get short term access token from Web login I went over to the regular facebook sdk for android.

              But if you want to do Web Login here is something that might help you:

              Android Activity Doc:
              http://developer.android.com/reference/android/app/Activity.html

              Intent Doc (you need intent to start new activitys):
              http://developer.android.com/reference/android/content/Intent.html

              QtAndroidExtras (you need it to call/run java code):
              http://qt-project.org/doc/qt-5/qtandroidextras-index.html

              Here a link to an older example of my facebook login thing. It still uses Web login:
              https://github.com/theScrabi/FbLoginQtAndroid.git

              If something is not clear, or you still have questions feel free to mail me :)

              greetings schabi

              1 Reply Last reply
              0
              • T Offline
                T Offline
                the_scrabi
                wrote on last edited by
                #19

                All right i said i would need a few days. I guess I overestimated my self a bit. It now took me about two full months to get it working that prober to give it to other people. But now I also did a small documentation.
                I hope it will help somebody. And if you still have questions or any wishes feel free to mail me.

                Github repository: https://github.com/theScrabi/TizFbExample

                Chears schabi

                1 Reply Last reply
                1
                • T the_scrabi

                  I finally got it working !!!
                  I was able to merge the Facebook SDK into my Android app, to get 60 day longterm accesstoken.
                  If someone is interested please answer me, or write me a mail. Then I'll try to prepare the code so everyone can have it :)

                  but despite its working, its not very nice.

                  chears schabi

                  V Offline
                  V Offline
                  Vicky Sharma
                  wrote on last edited by Vicky Sharma
                  #20

                  @the_scrabi

                  I also stuck to use Fb login in my QML.
                  Would you like to share me how to do yourself so will be able to do myself too.

                  Yeah ..
                  This example is working as per requirement thanks for this.. :)

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    Danibray
                    Banned
                    wrote on last edited by Danibray
                    #21
                    This post is deleted!
                    aha_1980A 1 Reply Last reply
                    -2
                    • D Danibray

                      This post is deleted!

                      aha_1980A Offline
                      aha_1980A Offline
                      aha_1980
                      Lifetime Qt Champion
                      wrote on last edited by
                      #22
                      This post is deleted!
                      1 Reply Last reply
                      0
                      • J Offline
                        J Offline
                        junaidbyrd
                        Banned
                        wrote on last edited by
                        #23
                        This post is deleted!
                        1 Reply Last reply
                        -1

                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups
                        • Search
                        • Get Qt Extensions
                        • Unsolved