Forums

OverviewV-Play 2 Support (Qt 5) › Facebook plugin

Tagged: 

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #12123

    Phil

    Hi,

    I am trying the Facebook plugin example under the free license and I am having the following error at runtime:

    qrc:///qml/main.qml:76: ReferenceError: Facebook is not defined

     

    I have generated correctly the licenseKey and the appId.

     

    Regards,

    -Phil

    #12128

    Günther
    V-Play Team

    Hi Phil!
    Did you follow the installation instructions for the plugin?  The plugins are not installed by default, it is required to add the with the MaintenanceTool of your installation.

     

    Best,

    Günther

    #12136

    Phil

    So I installed V-Play in /opt/V-PlaySDK and I run /opt/V-PlaySDK/Tools/QtCreator/bin/qtcreator.sh and I get this message when I try in the Facebook plugin example.

    I also tried to install Qt 5.5.1 with the V-Play repository and it can’t find the following code: import VPlayPlugins.facebook 1.0. I tried to modify QML_IMPORT_PATH but it doesn’t work.

    I am coding under Ubuntu Linux.

    #12143

    Alex
    V-Play Team

    Hi Phil,

    I will follow up your support request here: Can you please let me know the following:

    1. For which platform are you building your project (Linux Desktop or a mobile device like Android or iOS)?

    2. If a mobile device, can you have a look inside the directory “<V-Play-Root>/5.5/android-xyz/qml/VPlayPlugins/facebook/” and give us a short listing of the included files (if you’re building for iOS please replace the android-xyz with ios).

    Many thanks,

    Alex

    #12161

    Phil

    1) I am building for the Linux Desktop for the moment and then Android and then iOS.

     

    2) I do have the plugin for the Linux Desktop but I have nothing under the Android directory:

     

    $ ls /opt/V-PlaySDK/5.5/gcc_64/qml/VPlayPlugins/facebook
    FacebookProfile.qml Facebook.qml qmldir

     

    $ ls /opt/V-PlaySDK/5.5/android-xyz/qml/VPlayPlugins/facebook/
    ls: cannot access /opt/V-PlaySDK/5.5/android-xyz/qml/VPlayPlugins/facebook/: No such file or directory

     

    Thanks.

    #12170

    Alex
    V-Play Team

    Hi Phil,

    I guess you replaced the xyz with your Android architecture, right? So either /opt/V-PlaySDK/5.5/android_armv5, /opt/V-PlaySDK/5.5/android_armv7 or /opt/V-PlaySDK/5.5/android_x86?

    If yes, can you send us the file “components.xml” from the V-Play install root directory to support@v-play.net so that we can have a closer look into that issue? There is no sensitive data stored in the file, it just lists the installed packages’ names.

    Many thanks,

    Alex

    #12207

    Lorenz

    Hi Phil,

    just to clearify, here is the standard procedure to get plugins working on Linux, which I just tested myself again:

    1. Install V-Play (I installed to ~/V-PlaySDK)

    2. Open the MaintenanceTool (in install root, so for me ~/V-PlaySDK)

    3. Select “Add or remove components”

    4. Click “Settings”

    5. Click Repositories

    6. Scroll down, select “User defined repositories” and click “Add”

    7. Enter https://sdk.v-play.net/plugins/linux into the “Repository” column and click “OK”

    8. Click “Next”

    9. On the Package Selection Page, expand “Qt” and “Qt 5.5” and check at least one version of Android (either x86, arm_v5 or arm_v7)

    10. Expand the “V-Play Plugins” node and check “Facebook Plugin”

    11. Click next and proceed with the installation.

    Please keep in mind that to deploy to Android, you also need the Android NDK and SDK as described here: http://doc.qt.io/qt-5/androidgs.html

    Best practice to set this up is to follow our guide for Android deployment: http://v-play.net/doc/vplay-deployment/#android-deployment

    If your problem persists, you might also try to re-install V-Play from scratch and follow the steps above.

    Please let us know if you were able to solve your problem.

    Best,

    Lorenz

     

    • This reply was modified 2 years, 6 months ago by  Lorenz.
    #12320

    Phil

    Sorry for the late reply but the update didn’t fix the problem so I will try to reinstall from scratch.

    #12328

    Phil

    I just tried to reinstall everything and by using the MaintenanceTool and I still have the following error when I try to run the FacebookSample:

    qrc:///qml/main.qml:76: ReferenceError: Facebook is not defined

     

    I did try to rebuild the local project but without any success.

    #12330

    Phil

    I am trying to include a QML search path explicitly in the .pro file using:

    QML_IMPORT_PATH = /opt/V-PlaySDK/5.5/gcc_64/qml/

     

    And it still doesn’t work.

    #12332

    Lorenz

    Hi Phil,

    in your V-Play installation folder, there should be a file called “components.xml”. Can you post the contents of this file here?

    Your V-Play installation might be corrupted in some way, components.xml will tell us more.
    Did you delete your whole V-Play folder before installing again, or did you use the same Maintenance Tool and folder as before?

     

    Are you able to build other apps for Android? Can you try loading one of the V-Play Examples and building that for Android?

    If not, did you follow these steps: http://doc.qt.io/qt-5/androidgs.html

    (in particular, did you run

    sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386
    

    ?

     

    Is there the possibility that the Maintenance Tool doesn’t have full write permissions to your V-Play directory?

    Can your try re-running the installation of the plugin with ./MaintenanceTool > log.txt and send us the log file via e-mail?

     

    best,

    Lorenz

    • This reply was modified 2 years, 5 months ago by  Lorenz.
    #12407

    Phil

    Regarding this problem and in order to help others then I can say the following:

    – The Facebook plugin doesn’t work on the Linux Desktop; only on Android or iPhone

    – I needed to use Qt version 5.5; I was using Qt 5.3

     

    Now I have a problem with the license but this is out of topic to this thread.  Thanks for the great support.

    #12437

    Lorenz

    Hi Phil,

    Glad you managed to work it out.

    Thanks for the feedback, we will update our documentation!

    Concerning the license-problem, please contact us via e-mail.

    Cheers,

    Lorenz

    #13934

    V-Play User

    Hi Lorenz

    I also stuck in the same problem, I have to use Fb, Twitter login on my QML app.

    I am using Qt5.5 and Qt 5.6 with creator 3.6.1 but unable to use Fb login, During this process doesn’t show name of the user.

    Currently using Linux and than will deploy on Android but how can i do that please suggest..

    Project is facebookSample available on git by v-play and just update my app_id with other needed..

     

    Please revert ASAP…

     

    #13935

    Günther
    V-Play Team

    Hi!

    As we simplified the integration process for plugins, the FacebookSample on GitHub and description in the above thread is no longer valid. There’s no need to install the plugins with the MaintenanceTool anymore. They are installed along with the engine now. Please use the new PluginDemo to see how to use and integrate all of the plugins. You can also have a look at the documentation of the Facebook plugin for a description of the integration steps.

    The Facebook plugin is still only available for iOS and Android, so it is required to deploy to a mobile device to test the features. See our Android Deployment guide or watch the tutorial video to learn how to build and deploy V-Play applications for Android.

    Hope this helps!

    Best,
    Günther

Viewing 15 posts - 1 through 15 (of 15 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support