I don't have muich experience with the Facebook API, but I believe this snippet from your link is what you are looking for:
When this has been completed, Facebook will once again callback to
your callback URL with the method "payments_status_update" and the
"status" variable set to "settled". This is when you will definitively
know that the transaction was completed successfully and you can then
perform any operations to give the item to the user.
All you need to do is to record a flag in your database field. NOTE: I am assuming you have lots of products stored in a products
table, and lots of users stored in a users
table. In the users table, you would probably have to store their facebook id (not the username, the numerical ID), to identify them in the future.
When facebook does a call back to payments_status_update
with the status
set to settled
, you need to create a link between the products
and users
table using an intersection table called products_users
. (This means that the user now owns this product/content).
When the user hits your app, you grab their numerical userid, and then check if a link exists between their ID and the products
table via products_users
. If there is, you can write an SQL query to retrieve a list of products they have brought. Based on this, you shoudl be able to determine if the user can see the premium content or not.