This post is part of a series about making a Facebook game from scratch in one week. Go read the Overview to find out more and see a list of all the posts.
That's obviously still possible, but it took longer than I felt it should have. And there are a lot of little caveats that are buried deep in the docs, if at all. Things like the fact that your app is no longer authorized to do anything once a user signs out of Facebook. You have to ask for the special extended permission "offline_access" to do that, but I thought it would just be a part of authorizing an app. I'd wager most end-users have no idea what the difference is.
At the end of a solid 8 hour day I had my app getting authorized the first time, but there's still a lot of bugs around getting re-authorized for users that come back. I did find some good reading about the new process, and I'll use that to hopefully get things up and running tomorrow.
Throughout the course of integrating Facebook I've had to change the model a lot. Battles now have a join table for keeping track of users' stats, and I've added "elements" to users and powers, based on Facebook data. This should make the battle system a little more complex, and interesting. In order to keep things balanced with these changes I had to add another set of 3 powers. So we're up to 27 powers. That's 9 categories of 3. And 6 of those are elemental based now.
Daily Wrap Up
I didn't get nearly as much done today as I wanted to. Facebook integration is slow-going, and difficult to debug. It would really help if they had clear, concise examples on how to do exactly what I want, but that's probably a pipedream. I'd settle for a easy to use sandbox mode.
Now for some stats about Day 4:
- Working Time: 8 hours
- Number of Commits: 5
- Total Number of Files: 59
- Total Lines of Code: 1513
Update: Go on to Day 5.