This project is read-only.

Detecting Owner/Visitor

Oct 25, 2007 at 3:27 PM
Edited Oct 25, 2007 at 9:42 PM
Hi. I am new to this forum/codeplex so please be kind if I do not follow every protocol (will learn). I am starting to write my first Facebook application and was very pleased to learn about Facebook.NET.

I want to be able to detect if the owner is viewing their own installed application on the "canvas" (not profile) page. Inversely I would like detect if a visitor is viewing the owner's page. For my application both the owner and visitor will have the app installed. I just want to be able to display different screens on my canvas page based on who is visiting it.

Example: I write an application named FooBar. John and Mary both install FooBar. When John is logged in and goes to his profile and clicks on the FooBar "canvas page" application - I want to display a dancing bear. But if Mary is logged in and is viewing John's profile -- when she clicks on John's Foobar "canvas page" application link she is displayed a flying horse. However if she navigates back to her own profile and clicks on her Foobar application link she also is presented with a Dancing bear.

Is this possible? If so what prop's can i check to determine this? I think this is possible to display different views on the "Profie" page based on who is viewing it. I just do not know if this same logic is possible on the canvas page.

Update -- the "fb:if-is-own-profile" does this with fbml. How do I do this with the API or FQL? I am using an Iframe and do not have any fbml on my Canvas page.

Thanks in advance!