OverviewV-Play 1 SupportAbout FaceBook plugin › Reply To: About FaceBook plugin

OverviewV-Play 1 SupportAbout FaceBook plugin › Reply To: About FaceBook plugin


Guybrush said:


I am playing around with the facebook-plugin but just not able to get it run properly. When I run the facebooktest example shipped with vplay on my Android phone, it seems that the only button working is the login button. After clicking it, it opens up the facebook login dialog, which closes after entering my username and password. Back to the “mainmenu”, I can click whatever button I like, nothing happens.

Then I changed the code to keep only the possibility to login and post something on the users wall:


import VPlay 1.0
import QtQuick 1.1
import VPlay.plugins.facebook 1.0

GameWindow {

  Facebook {

    id: facebook
    appId: "489472511074353" // V-Play Test App 2, created by Chris

    readPermissions: ["email", "read_friendlists"]
    publishPermissions: ["publish_actions"]

    onSessionStateChanged: {
      console.log("New Facebook Session state: ", sessionState);

      if (sessionState === Facebook.Opened) {
          myText.text = "Facebook session opened."
          facebook.openWallDialog( {
                              "link" : "",
                              "description" : "This is the description",
                              "name" : "V-Play name!",
                              "caption" : "V-Play caption ..."
                                  } )
      else if (sessionState === Facebook.Closed) {
        myText.text = "Facebook session closed."
      else if (sessionState === Facebook.Failed) {
        myText.text = "Facebook session failed."

  } // end of Facebook item

  Rectangle {
    anchors.fill: parent
    color: "black"

  Scene {
    id: scene

        id: myButton
        text: "Post on Facebook wall"
        anchors.centerIn: parent

        onClicked: {
            myText.text = "Button klicked."

        id: myText
        anchors.bottom: parent.bottom
        anchors.horizontalCenter: parent.horizontalCenter
        text: "currently no action"
        color: "white"
  } // end of Scene

I kept the same appID like in the vplay-example. Now after login, on the bottom of the screen appears “Facebook session failed”.

Can you please tell me, what´s going wrong?


EDIT: I have no facebook app installed on my phone.





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
create apps
create games
cross platform
native performance
3rd party services
game network
level editor
easiest to learn
biggest time saving
best support