philippec / PhFacebook

MacOSX Interface to Facebook graph API
http://developer.casgrain.com/?p=107
Other
177 stars 44 forks source link

Can't authorize Facebook connection #8

Closed infiniteNIL closed 13 years ago

infiniteNIL commented 13 years ago

My token has expired and the authentication window comes up and just stays up. Tracing through the code, it never gets an error, nor does it get the login_success.html page. It just gets the uiserver.php URL. As a result it just stays open waiting for something that never happens. Have the authentication URLs changed perhaps?

philippec commented 13 years ago

It's possible, but I just tried deleting the application from my facebook profile and then requesting a token again with the sample application and it worked fine.

You can #define ALWAYS_SHOW_UI to help you debug the problem.

infiniteNIL commented 13 years ago

I would expect that to be the case. My problem happens because my token has expired. I don't want my users having to delete their application or some other work around.

Rod

On May 4, 2011, at 5:48 AM, philippec wrote:

It's possible, but I just tried deleting the application from my facebook profile and then requesting a token again with the sample application and it worked fine.

You can #define ALWAYS_SHOW_UI to help you debug the problem.

Reply to this email directly or view it on GitHub: https://github.com/philippec/PhFacebook/issues/8#comment_1099341

philippec commented 13 years ago

Ah, I never ran into an expiring token issue. Can you tell me how you expired your token? Did you simply have to wait it out? Like, 6 months or something?

Since I never encountered it, it is entirely possible that I do not cover that case, and I should...

infiniteNIL commented 13 years ago

It just happened. Last time I used it was probably at least a week old, maybe two. You might be able to modify the cookie associated with the token or something like that.

Rod

On May 4, 2011, at 8:44 AM, philippec wrote:

Ah, I never ran into an expiring token issue. Can you tell me how you expired your token? Did you simply have to wait it out? Like, 6 months or something?

Since I never encountered it, it is entirely possible that I do not cover that case, and I should...

Reply to this email directly or view it on GitHub: https://github.com/philippec/PhFacebook/issues/8#comment_1100153

infiniteNIL commented 13 years ago

I changed the code to ignore the expiration date of the token and it worked. It should be a permanent token because I initially retrieved it with the offline_access permission. So the bug seems to be that it thinks it expired when it hasn't.

infiniteNIL commented 13 years ago

I removed all the PhFacebook settings from my app's preferences .plist file and it still has a problem. The authentication window comes up blank and stays that way. The code is simply not getting the URLs it is expecting.

philippec commented 13 years ago

That sounds like a definite bug; I wish I had a test case so I could repro and fix the issue. On the other hand, since you can repro, can you debug and tell me the URL you're getting?

infiniteNIL commented 13 years ago

Here's the log with the URLs. As you see it's stuck on the uiserver.php URL.

didCommitLoadForFrame: {http://www.facebook.com/connect/uiserver.php?app_id=92153166291&method=permissions.request&display=popup&next=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&type=user_agent&fbconnect=1&perms=offline_access%2Cuser_birthday%2Cfriends_birthday%2Cpublish_stream} didFinishLoadForFrame: {http://www.facebook.com/connect/uiserver.php?app_id=92153166291&method=permissions.request&display=popup&next=http%3A%2F%2Fwww.facebook.com%2Fconnect%2Flogin_success.html&type=user_agent&fbconnect=1&perms=offline_access%2Cuser_birthday%2Cfriends_birthday%2Cpublish_stream}

On May 5, 2011, at 4:26 AM, philippec wrote:

That sounds like a definite bug; I wish I had a test case so I could repro and fix the issue. On the other hand, since you can repro, can you debug and tell me the URL you're getting?

Reply to this email directly or view it on GitHub: https://github.com/philippec/PhFacebook/issues/8#comment_1104910

infiniteNIL commented 13 years ago

If you want, you could send me your private email address and I could send you my app ID. Would that help?

On May 5, 2011, at 4:26 AM, philippec wrote:

That sounds like a definite bug; I wish I had a test case so I could repro and fix the issue. On the other hand, since you can repro, can you debug and tell me the URL you're getting?

Reply to this email directly or view it on GitHub: https://github.com/philippec/PhFacebook/issues/8#comment_1104910

infiniteNIL commented 13 years ago

My app was rejected from the Mac App Store because of this bug, so I had to remove it. The tester would get the authentication window to come up and all it would say is Success and then the app wouldn't do anything else. Any idea what might cause this?

philippec commented 13 years ago

I'm sorry that happened! I will try to see what I can do, but at this point, since you have the source, you should be able t debug it too.

For obvious reasons I want this to be fixed, but I'm afraid it won't happen soon as I'm going away w/o internet for the next few days, and debugging FB issues requires internet :-(

infiniteNIL commented 13 years ago

I can't debug it either because it works fine for me. I've tried logging out of Facebook and removed my app from the list of approved apps. Always works fine. There must be some kind of Facebook setting or something else causing the problem. Maybe it's the original expired token problem, but I haven't been able to duplicate that either since my token has been renewed and the Apple people haven't responded to my inquires.

philippec commented 13 years ago

Maybe you could make another fb account for testing? Just a thought...

vytis commented 13 years ago

I have experienced the same problem. The login window says "Success" and doesn't go away. It is caused by setting facebook to always use secure connection (account settings->account security->secure browsing). Setting it back to plain http seems to fix everything.

infiniteNIL commented 13 years ago

So does that mean the fix is as simple as looking for URLs that start with http: or https:?

vytis commented 13 years ago

Well I am not sure why it is behaving differently when using https. For the time being the simple fix is to disable secure connection from facebook preferences.

infiniteNIL commented 13 years ago

That doesn't work for me. I don't have control over my user's Facebook preferences. Nor Apples.

philippec commented 13 years ago

Gah, I really need to get a handle on this issue...

philippec commented 13 years ago

Looks like this is getting handled by issue #19. Will revisit this as soon as #19 is complete.

infiniteNIL commented 13 years ago

Yes, my fixes should fix this as well.

philippec commented 13 years ago

infiniteNIL, vytis, could you pull the latest source and report here if this issue is fixed? Thanks!

vytis commented 13 years ago

Yes it seems that everything works as expected. When I have turned on secure connection in facebook preferences the popup showed up and after logging in the sample app works fine.