Facebook plugin Construct v.108.2

0 favourites
  • 9 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Hey all,

    I'm currently coming up to the final stages of a game that I've been working on. Due to the company I work for I will be unable to post the capx of the file I am working on.

    Instead I have provided a new capx with the problem I am having.

    File I have made containing the issue

    dl.dropbox.com/u/74175978/Test.capx

    My question is how do I get the facebook API to respond so the user has to log in so I can post there high scores on there walls?

  • Bump

  • You must use the 'Log in' action before you can use any other features of the Facebook object. Your project does not actually log in the user anywhere.

  • ok thanks for the reply, I have just edited the capx (still in the same location)

    The problem still occurs.

    In the main game I am asking the player to log in but the API isn't loading.

    On the test example when you run the file it produces a white background.

    In the event sheet I have stated the image will only appear when the facebook API is ready.

    When the API is ready the log in sprite will appear and a prompt to log in should appear.

    When you have successfully logged in the page should move to layout 2 and display the YAY image.

  • Look up the Facebook object in the manual. You can only use the 'Login' action in a user input event - you can't log users in automatically.

    og in

    Open a popup window requesting the user to log in. This can only be called in a user-input event, such as a key press, button push, mouse click or touch screen tap. The user may cancel at the log in screen so logging in is not guaranteed to be successful.

  • Ok, I see that I have to have a user input to log the user in, what I don't understand is why the API is failing to load.

    On the example provided the screen remains white until the API is in a 'ready state'

    If the API doesn't enter this 'ready state' then no further actions will work regardless of players input.

  • I have had another look at the code I am using for the Facebook API to work and I still can't see where I am going wrong.

    In the example above (Test.capx) the facebook login sprite wont load until the facebook API is ready.

    Can anyone help me get over this stage as I'm sure once I can get the API to load I can figure out the rest on my own.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You need to enter your App ID in the Facebook object's properties, otherwise the object will not load the Facebook API (since Facebook requires the App ID to even connect).

  • Ahh, thats where I must be going wrong.

    I'm sure I've had this working in r99 without the app ID.

    Thanks for all the help you've offered and I'll try again when I register with the development section of facebook

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)