Hi,
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" // Felgo 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" : "www.felgo.com",
"description" : "This is the description",
"name" : "Felgo name!",
"caption" : "Felgo 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
SimpleButton{
id: myButton
text: "Post on Facebook wall"
anchors.centerIn: parent
onClicked: {
myText.text = "Button klicked."
facebook.openSession();
}
}
Text{
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?
Thanks
Heini