Sharing on Facebook - IAP?

Get help using Construct 3!

Post » Wed Oct 11, 2017 10:20 pm

In my game when a player loses a life, they can get one back by sharing a message on Facebook that advertises the game.

How would I go about implementing this? Is it a kind of In App Purchase?

If so, which tutorial do I need to read?

Thanks all :)
B
9
S
4
G
3
Posts: 100
Reputation: 2,627

Post » Thu Oct 12, 2017 9:31 am

It is not IAP related, since IAP plugin is not interfaced with Facebook.
In the absolute, you only need the Facebook plugin - so the manual article https://www.construct.net/gb/make-games ... e/facebook - to use it.

You prompt your user to share, and from there you could add a value to your life total, something like that.

Nevertheless, the system can be "defeated", since there is no trigger "back" to tell you the user DID share. No way around that though I'm afraid, unless you use the SDK to add this missing trigger for your own usage.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,328
Reputation: 71,298

Post » Fri Oct 13, 2017 8:15 am

Thanks for replying.

So looks like there’s no real benefit to share solely on Facebook for an extra life if there’s no guarantee the user will actually share. So instead I’ve beeen looking into sharing high score screenshots on social media.

I’ve found the following tutorial for C2 (https://www.scirra.com/tutorials/1457/s ... oid/page-3) but on page 3 it mentions webstorage - any idea how I adapt this for C3 and use localstorage?

Cheers
B
9
S
4
G
3
Posts: 100
Reputation: 2,627

Post » Fri Oct 13, 2017 9:35 am

The usage of local storage is plenty described in the How do I FAQ for Construct 2 and works the same for Construct 3.

Local storage is close to webstorage with an asynchronous behavior.

You'll need to use the action "Is existing" and manage both answer status in two separate events.
-> X is existing, set the key and the value.
-> X is missing, create the key, set it to the value you want.


X is set => You've just saved your key and its value.
New to Construct ? Where to start

Image Image

Image Image

Please attach a capx to any help request or bug report !
Moderator
B
296
S
119
G
96
Posts: 7,328
Reputation: 71,298

Post » Fri Oct 13, 2017 12:33 pm

I'm following the tutorial and on page 3 it tells me:

Then head back to the Local key exists event and add the action "System > Set value" and set the variable to "ScreenshotLink" and use the value "WebStorage.LocalValue("Screenshot")"


...but C3 doesn't let me enter this value, instead I have entered:

Image

...is this correct?

Also on page 4 I have to download and install he PhoneGap plugin. I've downloaded it, but have never installed a plugin before. Which of the downloaded files do I need to install and where?

Image

Thanks.
B
9
S
4
G
3
Posts: 100
Reputation: 2,627

Post » Tue Oct 17, 2017 4:21 pm

OK - so i'v found the Addon Manager in the Menu - but the manual says I can only install .c3addon files, but there are no .c3addon files in the PhoneGap plugin folder.

Can anyone let me know what I'm doing wrong or how install this plugin, if indeed it it the right plugin?

Thanks.
B
9
S
4
G
3
Posts: 100
Reputation: 2,627


Return to How do I...?

Who is online

Users browsing this forum: No registered users and 0 guests