Facebook Application Redirect Loop after authentication - facebook

I've encountered this problem while using the facebook c# sdk v4.2.1:
After allowing the app, a user using a IE browser without flash being installed will go on a infinite redirect authentication loop.
At first i thought it was a cookie problem , until i tested on another computer and realised that both of the computers had no flash installed.
Has anyone encountered this problem before? I know for sure i've encountered alot of problems that using the official facebook javascript sdk to authenticate users on IE without flash.
I would appreciate if anyone found a solution to this problem can answer this question.

Would you please edit you Facebook settings on Facebook i had the same problem before and i edit the settings on the advanced tap and it works :)
https://www.facebook.com/developers/apps.php?app_id=app_id
hope that works .

I just had this problem when reviving an older facebook app. I fixed it by enabling "signed_request for Canvas" in the Advanced settings tab on for the app on facebook.

Flash shouldn't be the problem. Did you install the Facebook handler in your web.config?
Also it sounds like you aren't being properly authenticated. You might want to sniff with something like Fiddler and see what is happening.

Related

What's the correct way to authorize PhoneGap application to the Facebook?

I spent a while already to fix annoying issue with Facebook in PhoneGap app. And still a lot of things goes wrong with that. The thing is that I use Appery.io and Facebook plugin.
This is how my Facebook console looks now:
I suggest that localhost might be a reason of the issue. However, I got it into Facebook_Helper.js:
Everytime I try to sign in with FB account, I get the same error at the child window:
So what I've got is that app is authorized at this moment indeed, because there's a menu button at the navbar that allows me to navigate through FB profile:
The first issue lies in that the child window never gets closed automatically once user submitted Sign In form. And the second one is that I can't get the access token to the app directly. I know I'm doing something wrong, but I spend more than a week on that and nothing was clarified.
Honestly, I've no idea why it's not working. I saw a lot of apps written in PhoneGap that use the same authorization too, and they work as it should. Will be appreciate if you take a look into that and, maybe, advice something.
First, I don't see iOS or Android in your developer.facebook screenshot.
Second, you should implement native facebook integration if you are developing an app, if I understand correctly from your code, you are trying to handle only web browser version of authentication. Native integration is both the suggested way by facebook and platforms and better experience for end users. If users have facebook app installed, authenticating over fb app is more secure after all..
You can use a cordova plugin for facebook integration, here is one of the plugins (I am one of the authors): cordova-facebook plugin

Facebook app links broken

Today, on my Facebook app, links appear to be broken. Everytime you click a link (to another page of the application, not external), Facebook returns the user to the login prompt, even if the user has already logged in.. I usually use relative urls, but if I set absolute, the link doesn't work too, but in this case the page doesn't change...
Anyone having same problems? Any ideas? I just can't find solutions..
Edit: for "Facebook app" I mean an iframe application that runs on Facebook site, not the Facebook application for a mobile device
Solved :) The problem was I used on old versione of the PHP SDK. I've updated the SDK with the latest version and also the Login part of the code; now it's ok. Thanks all for your help ;)
Did you tried to reinstall the Facebook app? Also if you use Android you can delete the cache on your phone.
Everytime you click a link (to another page of the application, not external), Facebook returns the user to the login prompt, even if the user has already logged in..
Do you have Authenticated Referrals turned on for your app?
Otherwise, you must be triggering login yourself somewhere in your app. If so, check the conditions under which you are doing so, and if your app recognizes a logged in user correctly, or if maybe there is some kind of cookie problem.
If that doesn’t help you to figure it out on your own, please update your question with relevant code.

Twitter OAuth Login Page on the iPhone

I have Twitter integrated into my application, with the help of Sharekit. Everything works pretty well except, if the user happens to tap on the "Sign Up" link on the Login/allow page, it goes to a non-sign up error page. Either a "Sorry that page doesn't exist" or "Hold up! Sorry the profile you were trying to view was suspended due to strange activity."
The account I'm using is working as far as logging in, posting etc. But that link seems to go off into space. Also if I click on the "Twitter Gear"/Application Icon the dialog (web view with the Twitter OAuth Authorize page loaded) just closes.
I can't find anything about how to configure stuff like this and everything else seemed to work pretty easily. The closest reference I could find was,this link Twitter API Issue 1045
Thanks in Advance for any help
Update:
I've been checking a few other apps with Twitter support. Most of the ones I've checked (TUAW,Joystiq,TFLN) seem to have rolled their own Twitter Login Page (using XAuth I assume) the one I found that uses the Twitter OAuth page (Shazam) actually takes you to mobile Safari and it exhibits the same behavior. Maybe I need to roll my own login?
I suggest you go into the ShareKit class files, go to the two .m files that have "twitter authorization" (im not sure which of the two it is, a simple search on xcode should find it) and change the invalid url that it is being sent to to this URL: https://mobile.twitter.com/signup
That should fix your problem!
I suggest using a packet sniffer on your device to determine the exact URL being called when you click the "Sign Up" link. There are plenty of ways to do this, but it is easier on jailbroken phones. Armed with the URL, you can see if it is potentially something you are doing wrong or indeed a twitter bug.
Try Jan Rain it makes it easy to integrate this functionality without errors.
http://www.janrain.com/products/engage/mobile
Here is a ShareKit folk I am using: https://github.com/baotuo/ShareKit
It looks do not have your issues and have much more improvement. You should give it a try.
When you implement twitter integration, you should not use the library which you used in older projects but download new twitter library. I had some problems with twitter oauth when I used older library. But after download and use new library, the issue was fixed.

Blank popup with FB connect

I've implemented the facebook connect using Javascript SDK. The authentication works fine when the user I'm trying to authenticate is not logged into facebook. But when he's already logged into facebook the login popup never closes. The url of the popup starts with "http://static.ak.fbcdn.net/connect/xd_proxy.php#cb=....."
This happens both on Firefox 3.5 and on Chrome.
Any suggestions? Do I need to set any extra parameters while connecting to Facebook?
I've encountered the same error today, with my year old implementation. I've added the channelUrl tag to FB.Init(), without any luck; so I started the login procedure from scratch with the js sdk, oauth2 enabled: with some minor changes, everything started to work misteriously again. I've run my pages through the Facebook debug tool as well, it suggested some changes as well.
To sum up: basically, if Facebook Connect stops working, upgrade your code according to the latest documentation avaliable.
No special parameters are needed. This is probably a browser problem. Maybe you have a setting/plugin somewhere that does not allow Javascript to close a window for you.
The easiest way to test this is to post a link to your implementation so that other people (with other browser setups) can give it a try.

How can I add a link to an iPhone native app from website IF POSSIBLE

I have a link to a Facebook page from a website. I know I can use the URL scheme href="fb://" to open up the Facebook application from within an iPhone, but if the iPhone user does not have the native application installed, an ugly error message pops up. I would rather just send this user to the Facebook website.
There's gotta be a way to do this, but everything I've tried has had some short-coming:
Can't make a HEAD request to a different server
Can't run a try catch javascript function since the event leaves the client page
Can't seem to access information about the user's applications... or can I? I've read a bit about a cookie called "appInstalled" but can't find any real documentation about it.
Any ideas out there? Thanks a ton in advance.
Denis
Can a website determine if a device [iPhone] has certain applications installed ? I'm pretty sure that's a big NO because of privacy and security concerns.
Not a really technical answer, but you could change the user interface to give the user an option. For example, having:
Click here if you have the facebook application installed on your iPhone.
If you do not, click here to go through to the site.
Sorry that I cannot offer a "proper" solution, I'm not really that familiar with iPhone development.