Stencyl 3.4.0 is now out. Get it now!

Facebook Extension - HTML5

gurigraphics

  • Posts: 660
Facebook Extension - HTML5
Works on HTML5.



SOFTWARE VERSIONS

Facebook Api - Version 2.7, Introduced on July 13, 2016.
Stencyl - Version 3.4,beta4(b9180) Introduced on June 29, 2016.



Features



Facebook Login and Logout 

1- Create a Facebook App: https://developers.facebook.com
2- Get yor App ID.
3- Insert blocks





Facebook Share 

1- Create a Facebook App: https://developers.facebook.com
2- Get yor App ID.
3- Insert blocks







Callback Blocks 

This blocks is to know if something was shared, login and logout.

How use?
- You can use to offer a prize for sharing.
- You can use to hide "login button" and show "logout button".
- You can show the person's name after login.





Profile Image Blocks 

One block you set the dimensions of the profile image.
Other block you get the URL of the image profile.





Profile Name 

This block is use to get profile first name.





Facebook Events 

This block is use to send events.
It is useful for have control of how many actions have been taken.

How use?
- You can send a event when user shared something.
- You can send a event when users complete some level.
- You can know which level the users are abandoning the game.





Get it

Download





How to Install

http://community.stencyl.com/index.php/topic,30432.0.html



Version History

Version 1.0
13/09/2016 - Facebook Share blocks .
Version 1.1
14/09/2016 - Add Callback Share.
Version 1.2
15/09/2016 - Add Login and Logout.
Version 1.3
16/09/2016 - Add get image profile, get first name, facebook events.




« Last Edit: September 16, 2016, 03:55:15 am by gurigraphics »

vikingpotato

  • Posts: 827
What level of customisation does it offer? Can you send out custom titles, icons or in game rewards, for example?

gurigraphics

  • Posts: 660
Quote
What level of customisation does it offer? Can you send out custom titles, icons or in game rewards, for example?

The customisation fields are shown in the image:

1- Picture
2- Name
3- Description
4- Caption

Ideas of how to use:

1. You can use a different image and text for each completed scene:

- World 1 completed
- World 2 completed
- World 3 completed
- I finished this game. You could it?

2. You can use a image when the player arrive a certain level:

- Level 1 achieved
- Level 2 achieved
- Level 3 achieved
- You're a Player Super Power Mega Blaster .

3. You can use a image when the player find any item or secret stage:

- Secret level discovered
- You won new item.
- You won new rewards

4. In the field "name" you can put a "time" or "score":

- I killed 999 enemies
- I collected 999 items.
- My new record: 99999
- My best time: 99999

5- You can also make those Quiz Viral of Facebook:

Who Were You In A Past Life?
- Napoleon
- Cleopatra
- Elvis Presley

From what I've tested, 480x256 px is the ideal image size to Facebook Timeline.



vikingpotato

  • Posts: 827
Looks great man! Do you think you could get it to work for iOS and Android games?

gurigraphics

  • Posts: 660
Quote
Looks great man! Do you think you could get it to work for iOS and Android games?

I will just focus on HTML5.
Because I want to do other functions: events, analytics, login, etc.
And solve popup blocking problems and that sort of thing.
If I try to do everything, I will not do anything right.

For iOS and Android there are these options:

Simple Share via e-mail, Twitter, Facebook etc. Works on iOS, Android
http://community.stencyl.com/index.php/topic,38875.0.html

Ojya Leaderboard Facebook Extension for iOS and Android
http://community.stencyl.com/index.php/topic,43592.0.html

Bhoopalan

  • *
  • Posts: 860
That's going to be beautiful. But is HTML5 port is stable in Stencyl yet? Last time I tried, it had many bugs.
If I helped you at anytime, help me back build my twitter followers :)
https://twitter.com/imbhoopalan

gurigraphics

  • Posts: 660
Quote
That's going to be beautiful. But is HTML5 port is stable in Stencyl yet? Last time I tried, it had many bugs
HTML5 for me what does not work well was "scene transition effects".
I had no other bug.
Only performance problems that I solved by creating own collision systems.

The game I'm developing is practically a software done in HTML5/Javascript.
https://www.youtube.com/watch?v=rMtCcY9OxCw

It's like a "Stencyl" that using blocks to create songs.
I need a Facebook Extension precisely to use in this game.

gurigraphics

  • Posts: 660
Download available

Richard Sneyd

  • *
  • Posts: 183
Thanks for creating this, very useful! However, in the scope variable in facebook.js, you should remove the manage_notifications permission request as it is deprecated and causes errors, and include public_profile, since it is good practice to do so explicitly, though not essential.

Great work!

gurigraphics

  • Posts: 660
Thanks.
Ok. I'm not sure if it still works.
This extension need upgrade to Facebook API Version 2.8.
Flws

LenseOnLife

  • *
  • Posts: 73
That's a brilliant new world for Stencyl - thanks

What a clean and polished plugin!;)