Load your Facebook profile picture in a Sprite object

Index

Stats

2,686 visits, 5,759 views

Translations

This tutorial hasn't been translated.

Tools

This is a super easy tutorial. You just need very little knowledge about Facebook Graph API to use this.

(Or you don't even have to read all the long documentation from Facebook after reading this!)

Reference

Related Facebook Graph API documentation: https://developers.facebook.com/docs/graph-api/reference/user/picture/

When to use it

In my opinion, you may use this to show some user's information such as his/her name, profile picture,...

Look at the screenshot below

Setting things up

First, add a Sprite object and a Facebook object in your game.

Then you can download this image and insert it in your sprite. This will be the default image when the user is not logged in.

Register your app at Facebook Developers and get the App Id and App Secret (if necessary).

Then enter these keys in the Facebook object in Construct 2.

You can create a Text object to show the user's name.

Finally, create a button to trigger a Facebook login.

  • 0 Comments

  • Order by
Want to leave a comment? Login or Register an account!