Construct 2 and Facebook plugin?

0 favourites
  • 8 posts
From the Asset Store
Casino? money? who knows? but the target is the same!
  • Yes, i have read manual, and tutorials section on this website and i searched forum, but I still cant manage to get Facebook functions in my game. After 5 hours of research i decided to post question here

    I already added Facebook object and entered APP ID and APP Secret, I also made app public and available to all users.

    Facebook login is not working. I added "Log in" action to "On tap gesture" of button, but when i click on this button nothing happens.

    You can also download my project file, so you can see what i did (check "Start Event" sheet). I also removed APP secret from project file.

  • it has something to do with your button object, if a replace it with a sprite object everything works great

  • yea Button uses On Clicked, not tap gesture

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Thanks! That helped me alot! Now i have some other question.

    How can i get facebook profile picture inside Construct 2?

    I tried creating empty sprite end then loading picture from url with this expression: "https://graph.facebook.com/" & Facebook.UserID % "/picture", but i get nothing... IDK why.

  • Hopefully someone with experience with this plugin can help.

  • Thanks! That helped me alot! Now i have some other question.

    How can i get facebook profile picture inside Construct 2?

    I tried creating empty sprite end then loading picture from url with this expression: "https://graph.facebook.com/" & Facebook.UserID % "/picture", but i get nothing... IDK why.

    "https://graph.facebook.com/" & Facebook.UserID & "/picture"

    the & is your problem i think, because it works when i try it

  • EyeForcz,

    That old way to get the profile picture stopped working with the last couple of Facebook API updates. In order to get the profile picture now you would need to use the ajax plugin and either my free Facebook core plugin(non mobile) or cranberrygames plugin for mobile platforms. Once you log in using on of the plugins just mentioned, make an ajax get call to the following address

    https://graph.facebook.com/me/picture?r ... ess_token={User Access Token from mine or cranberrygames plugin}

    This returns a JSON array that you can parse to get just the url value. IF you are not good at that, you could just use the tokenat system expression to strip it down to just the url you want.

    Of course you can also pick up my user information plugin to streamline the information. It's compatible with Cranberrygames plugin as well. You can pick it up at http://lockegames.com

  • Wait, does the "https://graph.facebook.com/" & Facebook.UserID & "/picture" actually work? It shouldn't but maybe I havent tried it.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)