I am creating a flash game, and I would like the users to be able to log on using Facebook. So far I have used the facebook-actionscript API to successfully create a .swf file that allows users to 'log in' to my flash game. From here, I have access to their information such as their Facebook ID and name.
My suggested approach from here (which may be rather naive) was to use the Facebook ID as a unique identifier for a user. I would then include this id when making calls to the php back-end.
For example, if a user wanted to retrieve their list of items. I would send a 'get items' request to php containing their Facebook id. In my database, I would store the Facebook ID of each user and thus would be able to return the right items.
I was just wondering if there was a different/better approach to this sort of thing. I assume I would need some form of encryption if I were to go ahead with my plan. Can anyone advise on this?