Forum Sitebox parameters that are sent to the swf

Discussion and help relating to the PlayerIO webpage and Facebook app hosting solution, Sitebox.

parameters that are sent to the swf

Postby RastaRalle » June 17th, 2011, 1:14 pm

hi!
I'm currently planning to make a sitebox facebook game, and I have some general questions, I'd like to ask, before I start.
Is there anywhere a list of all parameters, that are passed to the swf?
For example, there is the post_ids parameter. There are post_ids, if a user really invited friends. Do I have to set this parameter explicitly somewhere, or is this done by facebook automatically?
Are there more parameters of this type?
My second question is, if a user sends a request to another user, but no invitation, but something like: "Can you help me by sending me an apple". Then, when the user gets this request and clicks on "accept", he'll be redirected to the canvas_url. So, is there something like a "request_querystring", that is passed to my swf or do I have to manage this by myself?
Because I have to read the request object out and reward the user that sent the request.

I hope you understand what I mean, because if I read this text, I don't :)

Ralf
RastaRalle
 
Posts: 63
Joined: August 18th, 2010, 2:46 pm

Re: parameters that are sent to the swf

Postby Henrik » June 17th, 2011, 2:53 pm

RastaRalle wrote:Is there anywhere a list of all parameters, that are passed to the swf?

http://playerio.com/documentation/sitebox/templates#swf
"It passes all template variables into the Flash file as FlashVars, so everything that’s available to the template is available inside Flash."
So, what's in the template?
http://playerio.com/documentation/siteb ... _variables
Put that tag on your page to see what's in the template and also inside flash.

RastaRalle wrote:My second question is, if a user sends a request to another user, but no invitation, but something like: "Can you help me by sending me an apple". Then, when the user gets this request and clicks on "accept", he'll be redirected to the canvas_url. So, is there something like a "request_querystring", that is passed to my swf or do I have to manage this by myself?

As long as you use the swf tag to include your flash file in the template, all querystring parameters and similar will be automatically passed into your flash file as well. If you don't use the swf tag, you'll have to pass in all flashvars from the template yourself.
Henrik
.IO
 
Posts: 1880
Joined: January 4th, 2010, 1:53 pm

Re: parameters that are sent to the swf

Postby RastaRalle » June 21st, 2011, 3:08 pm

hey!
I knew that this "printvariables" tag exists, but I didn't think of using it this way :)
okay, so I really have to switch to a paid account before I even started coding my game, because otherwise I'm not able to see which variables are passed to the template. or better said, I don't know how they are named...
Am I right with this?
RastaRalle
 
Posts: 63
Joined: August 18th, 2010, 2:46 pm

Re: parameters that are sent to the swf

Postby Benjaminsen » June 21st, 2011, 3:27 pm

RastaRalle wrote:hey!
I knew that this "printvariables" tag exists, but I didn't think of using it this way :)
okay, so I really have to switch to a paid account before I even started coding my game, because otherwise I'm not able to see which variables are passed to the template. or better said, I don't know how they are named...
Am I right with this?


I have given you 14 days of free Plus so you can play around with the FB template system etc :)
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: parameters that are sent to the swf

Postby RastaRalle » June 21st, 2011, 9:59 pm

Thanks! you guys are great!
RastaRalle
 
Posts: 63
Joined: August 18th, 2010, 2:46 pm


Return to Sitebox



cron