This project is read-only.

just started and stuck at authentication

Sep 30, 2008 at 5:58 PM
Hi guys,

Just been using the toolkit, and can get data etc great but having an issue with the callback url. I've searched the net for a simple guide regarding the authentication model but completely confused.

What i have is a iframe based application. with callbackurl is http://localhost:1507/view.aspx on this page it gets data from fb all ok but when i click a hyperlink to another page it refreshes the page and reloads the view.aspx - i guess this it todo with the callbackurl. not sure what code i need to have on each page etc.

I currently have a paged called view which has the below, should I use the canvas iframe base page on both pages??

 public partial class view : CanvasIFrameBasePage
    {
        user userInfo = new user();

        protected void Page_Load(object sender, EventArgs e)
        {
            base.Api = Static.getWebSetting("fb_api_key");
            base.Secret = Static.getWebSetting("fb_secret_key");

            base.Page_Load(sender, e);

            if (!IsPostBack)
            {
                userInfo = this.API.users.getInfo(this.API.uid);
            }
        }

and a page called add

 public partial class add : CanvasIFrameBasePage
    {
        user userInfo = new user();
   

        protected void Page_Load(object sender, EventArgs e)
        {
            base.Api = Static.getWebSetting("fb_api_key");
            base.Secret = Static.getWebSetting("fb_secret_key");

            base.Page_Load(sender, e);
           
            userInfo = this.API.users.getInfo(this.API.uid);

            if (!IsPostBack)
            {
             
            }
        }


any help or advice would be great.

Thanks

Lee
Dec 4, 2008 at 6:56 PM
I have a similar problem when clicking on hyperlinks. It doesn't happen all the time, but about 90% of the time the entire web page (including facebook) will just reload. Anyone have any thoughts as to why?
Dec 14, 2008 at 6:52 PM
i have the same problem, sometimes it works but when it starts to load the callback-url i can't get out anymore, it reloads with a new auth_token everytime and i can't use my app anymore.
I am using the same construct in my form_load as monkeylee and i frames.

Thanks!
Dec 15, 2008 at 12:45 AM
I figured out my problem with hyperlinks: when you do an <a href=""> on your iframe page the url has to be http://apps.facebook.com/appid/pageyouwanttosee.aspx. I have no idea if this will help with the login problem (I never had that).

Neil