How do I add facebook share button?

Get help using Construct 2

Post » Sat Jul 18, 2015 3:38 pm

Hi,
Can anyone tell me how to make an user to share his/her score on their facebook page?

I have been developing a game from couple of days, its almost done. Now, I want to add a 'share to facebook button' on the homescreen of my game, which will share the users' highscore on their facebook wall on one click.
B
24
S
7
Posts: 337
Reputation: 2,224

Post » Sat Jul 18, 2015 4:01 pm

Add the facebook plugin to your game, then make events:
Event: On facebook_icon(or whatever sprite you use) touched/clicked
subevent is logged in action post score
else log in

So when he touches the button if the user is already logged in it will post the variable score(or whatever you store your score in), if not it will ask him to log in, and after he logs in he needs to press the button again to submit the score
B
21
S
11
G
6
Posts: 414
Reputation: 5,335

Post » Sat Jul 18, 2015 4:24 pm

@vikings It's not working man.
B
24
S
7
Posts: 337
Reputation: 2,224

Post » Sat Jul 18, 2015 4:31 pm

sudeep98 wrote:@vikings It's not working man.


Could you share your capx or a screenshot of your event-sheet, because the events/actions provided by vikings should work..
At least if you have entered your App ID correctly like the manual says:

Facebook object Manual entry

The tutorial How to make a facebook game explains in detail how to set up everything and get an App ID..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 18, 2015 4:35 pm

Hey, the game wasn't published yet. I told it's still in development stage. Will it work after publishing my game? @littlestain
B
24
S
7
Posts: 337
Reputation: 2,224

Post » Sat Jul 18, 2015 4:41 pm

If you get an App ID and all your events and actions are correct it should..

Even while testing, you must have an App ID if you want to use the facebook objects features..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 18, 2015 4:45 pm

Okay, without publishing my game is it possible to get an App ID? @littlestain

Also could you please tell where to enter this App ID?
B
24
S
7
Posts: 337
Reputation: 2,224

Post » Sat Jul 18, 2015 4:50 pm

That's why I provided those two links..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Jul 18, 2015 5:01 pm

Yes, I'm looking into it. Thanks alot @littleStain
B
24
S
7
Posts: 337
Reputation: 2,224


Return to How do I....?

Who is online

Users browsing this forum: LunaticCat, WesleyDeveloper9 and 4 guests