[WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan

This WebDNA talk-list message is from

2011


It keeps the original formatting.
numero = 106291
interpreted = N
texte = --001636c5b7e42a64a1049c4c0b7a Content-Type: text/plain; charset=ISO-8859-1 Here is the code to get the basic Facbeook information from a user when they go to your custom application installed on your page using the new iframes settings. Specifically, this example shows how to serve up two types of content depending on whether the person "Likes" you page or not. [!]--Get the signed request and split it to get the JSON Object--[/!] [!]--Strip out the elements I don't want and then I use index to find the node I want--[/!] [!]--Serve content A or B based on this variable --[/!] [listwords words=[signed_request]&delimiters=.] [showif [index]=2] [text]splitMe=[Decrypt method=base64][word][/Decrypt][/text] [table name=JSONconversion&fields=from,to] { } , " [/table] [listwords words=[splitMe]&delimiters={,] [index]: [ConvertChars table=JSONconversion][word][/convertchars]
[showif [index]=7] [showif [ConvertChars table=JSONconversion][word][/convertchars]^true] [text]RUAFAN=true[/text] [/showif] [hideif [ConvertChars table=JSONconversion][word][/convertchars]^true] [text]RUAFAN=false[/text] [/hideif] [/showif] [/listwords] [/showif] [/listwords] [showif [RUAFAN]=true] AAA [/showif] [showif [RUAFAN]=false] BBB [/showif] --001636c5b7e42a64a1049c4c0b7a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Here is the code to get the basic Facbeook information from a user when the= y go to your custom application installed on your page using the new iframe= s settings.

Specifically, this example shows how to serve up two typ= es of content depending on whether the person "Likes" you page or= not.

[!]--Get the signed request and split it to get the JSON Object--[/!][!]--Strip out the elements I don't want and then I use index to find= the node I want--[/!]
[!]--Serve content A or B based on this variable = --[/!]

[listwords words=3D[signed_request]&delimiters=3D.]

[showif = [index]=3D2]
[text]splitMe=3D[Decrypt method=3Dbase64][word][/Decrypt][/= text]
[table name=3DJSONconversion&fields=3Dfrom,to]
{=A0=A0=A0 <= br>}=A0=A0=A0
,=A0=A0=A0
"=A0=A0=A0
[/table]


[listwords words=3D[splitMe]&de= limiters=3D{,]

[index]: [ConvertChars table=3DJSONconversion][word][= /convertchars]<br />

[showif [index]=3D7]
=A0=A0=A0 [showif= [ConvertChars table=3DJSONconversion][word][/convertchars]^true]
=A0=A0=A0=A0=A0=A0=A0 [text]RUAFAN=3Dtrue[/text]
=A0=A0=A0 [/showif]
= =A0=A0=A0 [hideif [ConvertChars table=3DJSONconversion][word][/convertchars= ]^true]
=A0=A0=A0=A0=A0=A0=A0 [text]RUAFAN=3Dfalse[/text]
=A0=A0=A0 [= /hideif]
=A0=A0=A0
=A0=A0=A0
[/showif]

[/listwords]


[/showif]
[/listwords]


[showif [RUAFAN]=3Dtrue]
AA= A
[/showif]

[showif [RUAFAN]=3Dfalse]
BBB
[/showif]
--001636c5b7e42a64a1049c4c0b7a-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (David Bastedo 2011)
  2. Re: [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (David Bastedo 2011)
  3. Re: [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (Jym Duane 2011)
  4. Re: [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (David Bastedo 2011)
  5. Re: [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (David Bastedo 2011)
  6. Re: [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (Stuart Tremain 2011)
  7. Re: [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (David Bastedo 2011)
  8. Re: [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (Stuart Tremain 2011)
  9. [WebDNA] Facebook Application - Custom Tab for Fan / Non-Fan (David Bastedo 2011)
--001636c5b7e42a64a1049c4c0b7a Content-Type: text/plain; charset=ISO-8859-1 Here is the code to get the basic Facbeook information from a user when they go to your custom application installed on your page using the new iframes settings. Specifically, this example shows how to serve up two types of content depending on whether the person "Likes" you page or not. [!]--Get the signed request and split it to get the JSON Object--[/!] [!]--Strip out the elements I don't want and then I use index to find the node I want--[/!] [!]--Serve content A or B based on this variable --[/!] [listwords words=[signed_request]&delimiters=.] [showif [index]=2] [text]splitMe=[Decrypt method=base64][word][/Decrypt][/text] [table name=JSONconversion&fields=from,to] { } , " [/table] [listwords words=[splitMe]&delimiters={,] [index]: [ConvertChars table=JSONconversion][word][/convertchars]
[showif [index]=7] [showif [ConvertChars table=JSONconversion][word][/convertchars]^true] [text]RUAFAN=true[/text] [/showif] [hideif [ConvertChars table=JSONconversion][word][/convertchars]^true] [text]RUAFAN=false[/text] [/hideif] [/showif] [/listwords] [/showif] [/listwords] [showif [RUAFAN]=true] AAA [/showif] [showif [RUAFAN]=false] BBB [/showif] --001636c5b7e42a64a1049c4c0b7a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Here is the code to get the basic Facbeook information from a user when the= y go to your custom application installed on your page using the new iframe= s settings.

Specifically, this example shows how to serve up two typ= es of content depending on whether the person "Likes" you page or= not.

[!]--Get the signed request and split it to get the JSON Object--[/!][!]--Strip out the elements I don't want and then I use index to find= the node I want--[/!]
[!]--Serve content A or B based on this variable = --[/!]

[listwords words=3D[signed_request]&delimiters=3D.]

[showif = [index]=3D2]
[text]splitMe=3D[Decrypt method=3Dbase64][word][/Decrypt][/= text]
[table name=3DJSONconversion&fields=3Dfrom,to]
{=A0=A0=A0 <= br>}=A0=A0=A0
,=A0=A0=A0
"=A0=A0=A0
[/table]


[listwords words=3D[splitMe]&de= limiters=3D{,]

[index]: [ConvertChars table=3DJSONconversion][word][= /convertchars]<br />

[showif [index]=3D7]
=A0=A0=A0 [showif= [ConvertChars table=3DJSONconversion][word][/convertchars]^true]
=A0=A0=A0=A0=A0=A0=A0 [text]RUAFAN=3Dtrue[/text]
=A0=A0=A0 [/showif]
= =A0=A0=A0 [hideif [ConvertChars table=3DJSONconversion][word][/convertchars= ]^true]
=A0=A0=A0=A0=A0=A0=A0 [text]RUAFAN=3Dfalse[/text]
=A0=A0=A0 [= /hideif]
=A0=A0=A0
=A0=A0=A0
[/showif]

[/listwords]


[/showif]
[/listwords]


[showif [RUAFAN]=3Dtrue]
AA= A
[/showif]

[showif [RUAFAN]=3Dfalse]
BBB
[/showif]
--001636c5b7e42a64a1049c4c0b7a-- David Bastedo

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[WebDNA] Character encoding / entity database? (2009) [OT] Pushing Pages (2003) WebCat2_Mac RETURNs in .db (1997) [WebDNA] Limts? -and- Hot Merge (2009) Navigator 4.01 (1997) Interface to Quickbooks (2005) Kill the webcat process (2000) How do I make this faster???? (2000) WebCat2 several catalogs? (1997) 4.0 upgrade pricing (2000) RE: WebCatalog NT beta 18 now available (1997) Maybe Off Topic -- OS X/UNIX Shell Scripts? (2003) What am I doing wrong? (2000) DataBaseHelper Flawed (1997) WebCat2b12 CGI Mac - [shownext] problem (1997) all db's in one folder and protected (1998) ShowCart Errors *FIXED (2000) Nested vs conditional (1997) What's wrong with this [append] context? (2000) Resume Catalog ? (1997)