How do I add a facebook like button?

Get help using Construct 2

Post » Wed Jul 09, 2014 9:33 am

Hi guys,

This is probably very simple but I have a facebook page (not app) and simply want to add a like button to a HTML5 game. I assumed there would be 'prompt to like button' (no permissions required) in the Facebook object, but it doesn't seem to be the case.

Any ideas?
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Wed Jul 09, 2014 11:41 am

Can I just open a url to the facebook page with some parameters?
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Wed Jul 09, 2014 3:27 pm

So I solved this myself.

This page will give you either HTML, XFBML, iFrame or a URL => https://developers.facebook.com/docs/pl ... ike-button

However, the url option looks a bit crappy, since it opens up a new page with just the button on. So i wouldn't recommend pointing to that.

So instead what you can do is a html build, but choose to add the advert bar. You can then edit the source code to include the html for your like button.

The only problem with this is you have to do it every single time you do a new build. Is there a feature in C2 that allows you to specify this so its included in the build?
ImageImageImageImageImage
B
19
S
5
G
1
Posts: 614
Reputation: 2,542

Post » Sun Jul 27, 2014 12:52 am

Thanks for sharing @TheWyrm . :)

Adding user templates or templates for the HTML output would be a bonus for the exporter, in addition to having a user-selectable icon set, rather than having to load them into each project.
Image
B
27
S
9
G
5
Posts: 488
Reputation: 11,948

Post » Sun Jul 27, 2014 6:08 pm

My facebook plugin actually has this built into it. :)
https://www.facebook.com/groups/317378255096076/
www.h1k3.tech

We are here for you!
B
87
S
23
G
16
Posts: 715
Reputation: 16,835


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 33 guests