Facebook plugin Construct v.108.2

Get help using Construct 2

Post » Wed Nov 28, 2012 9:45 am

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
https://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?
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Wed Nov 28, 2012 12:30 pm

Bump
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Wed Nov 28, 2012 2:28 pm

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.
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Nov 28, 2012 2:55 pm

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.

B
13
S
2
Posts: 87
Reputation: 1,244

Post » Wed Nov 28, 2012 3:41 pm

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.

[quote]Log 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.[/quote]
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Wed Nov 28, 2012 3:46 pm

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.
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Thu Nov 29, 2012 9:20 am

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.
B
13
S
2
Posts: 87
Reputation: 1,244

Post » Thu Nov 29, 2012 11:23 am

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).
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544

Post » Thu Nov 29, 2012 11:44 am

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
B
13
S
2
Posts: 87
Reputation: 1,244


Return to How do I....?

Who is online

Users browsing this forum: 99Instances2Go, Artpunk, Bad Wolf, indiegrimes, NRABrazil, WhosWho and 29 guests