Load your Facebook profile picture in a Sprite object

3

Index

Stats

6,607 visits, 15,393 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 30 Mar, 2016. Last updated 19 Feb, 2019

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.

  • 1 Comments

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