Integrate your app to facebook, last SDK works

Discussion and feedback on Construct 2

Post » Thu Nov 26, 2015 9:03 am

Hi all, finally I almost finish what I studied and tryed for a month... if you remember, I was making that with the old sdk..and now, I almost finish to integrate facebook in PHP with the NEW SDK.

I integrate facebook to my project very easly and works perfectly and that is not a plugin! you have just to insert some file inside the folder of the app and works like a sharm!

why is better than a plugin?

-the plugin have to be updated if facebook change something.... in php is easier to fix a new update (you can do it, you don't have to wait)

- with the plugin, the user when accept the permission at start (with the pop-up, like every app) have to login again inside the app with some button and this is very annoying.
with my method ,when the user open my app, doesn't have to login again, so doesn't need extra login or some button.

-that should works with every platform that support AJAX object!, so should works with android etc...

- you don't have to make any complicate event or some loops to get the data, when the app start, your app will get 3 array builded for construct2 with:

-User profile (personal information (name,email....) with personal score and the position of the score)

-Hi-scores of you and your friends (users name, id, score, picture url)

-Achievements (you will get an array with the achievment locked and unlocked! ready to go), so that is very easy to show what achievement is locked or unlocked.

for this, just take one event to load the 3 array inside a construct2! and works very fast, because this is loaded before the app start.

and what you can POST?:

-update the user score.

-send notification to a user NEW

-unlock the achievement (with one event, you can unlock all, just change a parameter).

Image

I didn't insert a picture (in my server) for the achievements, but works perfect

-publish a objects inside the games feed, like in candy crush, when your user finish a level, you can publish the feeds with a personal data! like score or others!

Image

the score is from construct2, the picture of the level is just an example... and you can make your personal action!

-post in the user profile

so, now I have to make a documentation, who is interested to this post here (with some suggestion or question) I will send you a PM and I will update this post when everything is ready
Last edited by Ribis on Sat Jan 02, 2016 10:31 am, edited 5 times in total.
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Thu Nov 26, 2015 11:05 am

Hey, this seems to be great. I definitively want to try it.
B
72
S
19
G
1
Posts: 107
Reputation: 5,025

Post » Sun Dec 20, 2015 1:26 pm

added a new feature, now is possible to send a notification from your app to a user who use the app!

like, if a player beat a score of another player, the app will send a notification to that user, and you can change the notification!

Image

another example of feed story, in this case, construct2 will set the picture, the title, the description of the feed:

Image
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Sat Jan 02, 2016 12:19 pm

hey,
nice stuff here. keep up the good work.
B
78
S
27
G
100
Posts: 193
Reputation: 55,779

Post » Mon Jan 04, 2016 5:29 am

@Ribis Do you have a date when it will be available? Thank you.
B
42
S
16
G
3
Posts: 169
Reputation: 4,383

Post » Mon Jan 04, 2016 3:25 pm

CDogs1964 wrote:@Ribis Do you have a date when it will be available? Thank you.


8 January will be ready to sell inside my store, but I would like to publish inside the scirra store, so, the 8 for sure will be ready to download and use :D

EDIT: i didn't have time to finish at 8*, I'm still finishing to write the documentation (almost done)

thank you
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Wed Mar 30, 2016 9:40 am

Any news?
B
4
Posts: 1
Reputation: 202

Post » Wed Nov 23, 2016 10:03 am

UPDATE*

If someone want to integrate the app with facebook with the last SDK, tell me in PM. (no plugin, just use AJAX plugin)

Remember, the app doesn't need any button to get login and get the data, when the user open the app and accept the permission, everything will be loaded at the start of the app.

and if someone want some request, post here in the topic, for now, I made:

-get the user information and save inside your database ( good if you want to save some variable inside the database and get in the game when the user is logged inside the game with the fb profile)

-post score and get friends score.

-post achievement (and post in games feed ) and get the achievement already unlocked.

-send notification to a friends.

- the data that you will get is ready to go, you don't need extra event inside construct2, I made in php a script that will make an array for c2 ready to load inside an array, with a few event with just 1 REQUEST in ajax you will load everythings. (like, score array, user array, achievement array (locked/unlocked)...etc)

-NEW* an app can access to your page and check the likes, reaction for a post in realtime and other stuff.

what you need is a website with the SSL to work.
B
21
S
9
Posts: 298
Reputation: 2,967

Post » Wed Nov 23, 2016 10:25 am

Sounds great @Ribis!!


Wait... I do not exactly understand what this does? :)
If you do not need to login (to facebook) when starting the app, but the app can post highscores and have facebook profile data? From which user does it sends the highscores?

Do you have any tutorial, demo, manual or something?
B
14
S
4
Posts: 72
Reputation: 1,099

Post » Wed Nov 23, 2016 2:18 pm

fredriksthlm wrote:Sounds great @Ribis!!


Wait... I do not exactly understand what this does? :)
If you do not need to login (to facebook) when starting the app, but the app can post highscores and have facebook profile data? From which user does it sends the highscores?

Do you have any tutorial, demo, manual or something?


I was making a manual that I almost finish...

You will play the game inside the canvas of facebook (canvas app) like farmville or some game like that... (or in your website)

the problems of the facebook plugins of construct2 (or similar) are that, when you start the application, and after the app is loaded (after the construct2 loading) you have to click a button to get the permission of the app,and sometimes you have to reclick or refresh the page... also, with the plugin you have to make all of the event in contruct2 and that's sound a little bit complicated... because if you want like hi-score of your friends , achievements...etc you have to make a lot of call with the plugin.

With my method, when you go to the app of facebook, at the start (before the game) the user accept the permission (just one time) and later, will load the game like all app and while the game is loading, the app has already al data you need for making your game because I did all in php outside from contruct2.

you can get your profile inside construct2 and you can use for save in a database ( I made a script that do everything outside of contruct2) and you can get the hiscore of your friends who use the same app (or all scores from the users facebook, but you need a database for that)

also the hi-score if I remember is posted in the games feed like game achievements etc....

example:

in candycrush, you can see in what level your friend is, I can do the same, but for these things I have to make a specific script for your game, or explain what you have to do...I can use the facebook data for making your game better, for the game I already make : score, achievements, story (if for example a user find some object in the game, the game will post in the gamesfeed the story) like in candycrush when the user do a special combination and you can see in the gamesfeed
B
21
S
9
Posts: 298
Reputation: 2,967

Next

Return to Construct 2 General

Who is online

Users browsing this forum: Yahoo [Bot] and 10 guests