Tuesday, March 1, 2011

facebook application only accessible by my user account

Hi all,

I am developing this small facebook iframe app. I am using .net's facebook developer toolkit. It works fine for me with my user account. Though when I tried testing it through a friend's account (several friends actually) the facebook API doesn't seem to get populated with any information. My application is still in development stages.

Any ideas? This is really strange!

Edited : Ok this is resolved, I've updated to facebook developer toolkit version 3.0 (it is currently in beta, yet seems to be quite stable now)

Thank you all for your help!

From stackoverflow
  • Just a shot in the dark but did you hard code your credentials somewhere in the app?

    vondip : you mean my user id and perhaps password? If so, I didn't. I did hard code my app info
  • Check that 'sandbox mode' isn't set, under Advanced Settings.

    If you're using an iframe app, install Firebug http://getfirebug.com/ and have a closer look at the communications going back and forth.

    Have a look at the error logs on your server - is the correct data being requested? Is it being served up?

    View the source of your app's frame. In your case, it seems you have

    <fb:redirect url="http://www.facebook.com/login.php?api_key=[xyz]&v=1.0&next=default.aspx"/>
    

    That's an FBML tag, but not being parsed by Facebook. I suspect your app is set to be an iframe but maybe should be an FBML app. [update] If you need it to be an iframe app, you need to replace fb:redirect with the javascript call

    window.open('http://www.facebook.com/login.php?api_key=[xyz]&v=1.0&next=default.aspx')
    
    vondip : sandbox mode is disabled. Everything seems to work when working with my own user account. So I don't think it has much to do with the page, but rather something to do with facebook's api (or my approach to it)
    vondip : I am using an iframe app, cannot really change to fbml or certain things won't work.
    artlung : Right -- the choices are FBML or iframe. I think you're set to iframe but need FBML for the .NET framework you're using.
    vondip : so... how does it work fine for my user account?
    artlung : I would keep close to the documentation of the .NET framework you're using. I'm not familiar with it unfortunately.
    Richard Watson : That's cool, but then you can't use fb:redirect, so either you're doing it, or a framework is (as artlung says). What framework is it?
    vondip : I am using .net's facebook developer's toolkit (v 2.1). It can be found in the following link: http://www.codeplex.com/FacebookToolkit
    Richard Watson : I think developers are probably assumed to not need to login to their own app. I suspect the data sent/ headers are different.
    artlung : I'd look at the screenshot here http://www.stevetrefethen.com/wiki/Default.aspx?Page=Facebook%20application%20development%20in%20ASP.NET&AspxAutoDetectCookieSupport=1 -- "6. On the Canvas tab" did you do this when you set it up, or are you using "Creating your IFRAME ASP.NET Application" Looks like this may be helpful too: http://wiki.developers.facebook.com/index.php/ASP.NET
    vondip : ok, so I've added a bunch of other friends as the app's developers, they too cannot view the content of the application.
    vondip : Yes I've followed the screenshot (not that updated, facebook's got some new features there. It doesn't seem to be it.) and I've also followed the tutorial (though it teaches how to work with fbml aspnet facebook applications)
    artlung : yeah, the problem is that you have an iframe containing a , because it wants you to log in. But that FBML will never be parsed by Facebook. Read this about the differences: http://wiki.developers.facebook.com/index.php/Choosing_between_an_FBML_or_IFrame_Application
    Richard Watson : I manually typed in the URL in your fb:redirect: http://www.facebook.com/login.php?api_key=c281522d4133e306806f398866fd1038&v=1.0&next=default.aspx And that gave me a way to login. I suspect you should remove the fb:redirect and replace it with a window.open javascript call that can be executed by the browser.
    vondip : Well that's strange, I didn't add any fb:redirect tags to my app. I guess it the .net's framework that did so. If that's the case it's invisible to me... will need to check it out
    artlung : My guess is that the framework is doing a call to `Users.isAppUser()` and redirecting if false. http://wiki.developers.facebook.com/index.php/Users.isAppUser -- that's happening under the hood for you. If the framework is smart and knows you're using an iframe app seems like it would generate plain html code that would do the trick.
    vondip : @ artlung, you are right!!! Though why on earth aren't the other users considered to be application's users? They've added the app, they are even its developers. What could cause this?

0 comments:

Post a Comment