h1k3's Forum Posts

  • Ahh :)

  • newt

    Add all the elements to a family? So draw them off screen then move them all on screen when the menu is selected? Wouldn't that increase the events for drawing? Or am I thinking wrong regarding what you mean?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I have a menu designed around layers. So I have effectively 15 layers to switch between.What I currently am using is a group that physically shecks every layer and sets them one by one to visible/invisible regardless. Which brought me up to over 40 events. My questions is.

    Will this work? I'm afraid to commit to the change and have to redo everything all over again if it doesn't:

    <img src="https://dl.dropbox.com/u/77974757/menu_repeat.PNG" border="0" />

    I think the logic is sound but any thoughts or ideas on how to further optimize? This brought me down to just over 20 events from the over 40 if it works.

  • I'm only using the latest version, not sure how to save it in a previous version. :( Sorry. You might be better off using php for the free edition and using ajax to fetch the data that way. My way sucks up the event count.

  • For the ajax email if I remember right you 'GET' the following address:

    'https://graph.facebook.com/userid?fields=email'

    the just tokenat and replace the information you don't need to strip it down to email.

  • alesko007

    I've stripped down my store to just the basics so you can see how I handled the login. You will need to adjust the app-id in both the facebook plugin and event sheet 1. Also the url listed in event sheet 1. As you can see it also can handle if a user revokes permissions. So if someone decides to revoke permissions it sends them to the appropriate layer so you can explain more why you need the info and offer them a button to click and ask them for permissions again. You can also see how I used tokenat and replace to fetch the usertoken I need. It'll be the same concept when using graphapi to fetch the email address.

    My store base capx

    Anyone that looks at it, feel free to give me tips on further optimizing the event sheet to minimize the number of events. :)

  • It uses browser redirection. So to login in a user you will use the browser plugin to redirect the current website to the URL from the developer site. Make sure you have all the info filled in properly such as the redirect should point back to your website. There's a list on that site of the browser variables, for scope you add the permissions separated by a , and response_type should be token. Using code just forces you to prolong receiving the user token.

    After you logged them in use Ajax to get the email address.

  • You can, I played around with that for a while using someone example. If I remember I had to use the viewport or window size reference points to fetch the screens visible resolution. Then use math to plot all the sprites and stretch the tile background accordingly. Search the site using fullscreen for a term, it was a couple months back that I saw the example capx.

  • For permissions check the developer.facebook.com site, under one of the tabs is dialogs. You can use the login dialog to request permissions and log the user in. This sends the user token on login in the address bar for ajaxing the graphapi. Then as Kyatric says you can token at the last Ajax.lastdata to split the info by the : key. Then remove the unwanted info using the replace command. I'm building my game Facebook credits system using this exact method.

  • I'm actually finding that using the browser plugin for direct URL manipulation and Ajax I can get rid of all of the errors that keep popping up. For example face books documentation only shows you how to access scores using graphapi(Ajax)

    Scores documentation

    The downside is using Ajax requires a bit more doing then the Facebook plugin.

  • I haven't looked at it yet, I'm on my iPad. Is it possible to return values to a construct2 variable? If I were to use this to fetch data from say Facebook, how do I then get the returned info into a usable construct variable?

    Thanks

  • Publishing User Scores

    You can publish stories about a user�s score by issuing an HTTP POST to /USER_ID/scores and specifying a user�s score in the score parameter. An app access token (shown in the example above) is required to make this API call.

    graph.facebook.com/USER_ID/scores

    score=USER_SCORE&access_token=APP_ACCESS_TOKEN

    Scores show up in the app ticker in various story types that help drive re-engagement back to your app:

    More information in their blog post

  • Finally popped on my laptop. Your login isn't working because you don't have a login event recorded. Make sure to create an event that logs the user in when the api is available or use the method I mentioned earlier :)

  • Yay so currency works fine if the user sets it up in their account :)

  • Velojet,

    Nevermind, I can't seem to do direct link. You'll have to go direct to the app and follow one of the links. I would really appreciate it if you could.

    My storefront