Keeping track of facebook details after submission

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Keeping track of facebook details after submission

Post by social_experiment »

So i worked on an idea for a facebook application but i've reached an impasse. When i access the application the first time, i have access to certain user information without a hitch but if i submit my form (the application requires a option to be selected from a select menu), i get an error about the access token. I've googled this quite a bit and found some help but not enough to get the application really working (keeping the user information after the page has been submitted). Any ideas / help / url's on this? I am using the PHP-SDK for this, if that's of any relevance.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Keeping track of facebook details after submission

Post by Jade »

Why not store the information to sessions when you have it and then once the form is submitted you can reference the session data?
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Keeping track of facebook details after submission

Post by social_experiment »

Good point, i haven't really thought about that, or maybe i have but i'm not really sure how to implement it , i think it has to do with OAuth, because i catch the exception that's thrown. Most information relevant to it suggests (or at least i think so) calling the page, but with all the necessary details in the action attribute of the form. I'll look into the session angle over the w/e. Thanks for the tip
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
social_experiment
DevNet Master
Posts: 2793
Joined: Sun Feb 15, 2009 11:08 am
Location: .za

Re: Keeping track of facebook details after submission

Post by social_experiment »

I've tested it again using ajax and then the data persists, probably because a new page isn't accessed.
“Don’t worry if it doesn’t work right. If everything did, you’d be out of a job.” - Mosher’s Law of Software Engineering
User avatar
Jade
Forum Regular
Posts: 908
Joined: Sun Dec 29, 2002 5:40 pm
Location: VA

Re: Keeping track of facebook details after submission

Post by Jade »

If you don't want the data to persist you'd have to update it or clear it out after the next ajax call is sent.
Post Reply