I am attempting to get my ASP.NET(C#) facebook app working and it is giving me some problems.
I can get the app to run and auth the user. My problem is that when i run the app outside of the facebook app page(as just a website) my app is running fine, but when i run as an app on facebook(inside the facebook iframe) it shows an extra page. This page is link to my permissions page and if clicked, the app works fine from there.the problem is that the extra page that is showing.
i tried redirecting to the allow permissions page in the Page_init but that did not work.
i have also tried to to add the javascript(both by hardcoding and adding it dynamically, but that is also not working.
This problem is only when i try to gain permissions from user. Any help would be appreciated.
EDIT: To "fix" my problem, i abandoned ASP.NET, and made my app in php. good luck to any who has this problem. I am still curious about the solution.
Related
We were using code snippet return Redirect(redirectUrl); to redirect the user to site home page after successful authentication. (redirectUrl is the home page url). The code suddenly stopped working without any change made in the project.
On analysis we found that there was some issue with asp.net authentication redirect and updated the code to suppress the form authentication redirect and the issue got resolved.
Previous code which stopped working:
return Redirect(redirectUrl);
Updated code:
System.Web.HttpContext.Current.Response.SuppressFormsAuthenticationRedirect = true;
return Redirect(redirectUrl);
We need to understand why suddenly asp.net authentication redirect created issue in custom redirect even though there was no code change made in this file.
Can someone let us know what latest changes were made for the ASP.NET framework which might have lead to the issue. We are using asp.net framework 4.7.1 in our project.
Thank you.
ASP.Net websites can also be affected by IIS settings. In this particular case, the fix you found would indicate that Forms Authentication has been enabled in IIS. Typically this results in a change to your web.config file on the web server.
Comparing that file to the web.config file in your project may reveal what has been changed. Other than that, you've not given much detail to help anyone viewing your question to provide a definitive answer.
Scenario to be automated:
Open app and click the Login button
A browser opens an Auth0 login page
Enter credentials and confirm
Redirected to app, logged in per the credentials
Issue: In step 3, the login HTML inputs are not in the PageSource.
I’m using the Appium Nuget package, C# bindings.
Observations made:
According to the developer, the login screen is "opened in an internal browser inside of the web application, wrapped by the native app".
When launching the app, there are 2 Contexts (NATIVE and WEBVIEW_OurApp)
When the browser for Auth0 has opened, there is a 3rd Context available (WEBVIEW_Chrome)
Switching to this new Context does not provide me with the input elements of the Login page. Rather, I only get the following (relevant) DIV element:
https:/ourapp.auth0.com/authorize? client_id=abc&response_type=token%20code&redirect_uri=com.ourdomain.ourapp%3A%2F%2Fourapp.auth0.com%2Fcordova%2Fcom.ourdomain.ourapp%2Fcallback&audience=https%3A%2F%2Four-api.ourapp.be&scope=openid%20offline_access&auth0Client=abc%3D%3D
Anyone some ideas on how to make this flow work please?
Just posting the solution to this weird issue:
There was (is) some kind of configuration or installation issue with my Appium. I fixed it by installing the Appium Desktop software and starting a server session there (instead of via code).
Then I simply used this server session in code, which works fine.
Additionally, when running the faulty case before, the Appium icon never appeared in the notification bar. When running correctly, the icon should always be visible.
Finally, I noticed that a device running Android 6.0.0 doesn't work as intended also. It works fine with newer versions.
I've just taken a Facebook app live (ie: it's a web app that lives at apps.facebook.com). The app is a simple form that allows you to vote for one of four options. When submitting the form for the vote we also capture the FB ID in order limit the user to 4 votes per day.
When testing this app in sandbox mode as well as live in any browsers, the app functions fine. It even has exception handling in the edge cases where the user is not FB authenticated etc.
The issue we have encountered is that when a user visits the app from within the iOS Facebook app, the link opens within the Facebook in app browser (based on the iOS UIWebView component I believe). When using it from this environment, when the form submits our server is producing a 500 error.
Now I know that the 500 error will be nothing to do with facebook since it is our application code, but my confusion arises from the fact that this only happens from the Facebook in app browser. We are currently going about trying to determine the nature of the 500 error (we do not have access the production environment and custom errors have been switched off).
My question is this: Does the Facebook in app browser behave differently or do things differently than the standard UIWebView or iOS Safari?
I am thinking of differences such as interfering with POST data, clearing FB login credentials etc.
In short yes the Facebook in app browser does behave differently than the standard UIWebView and iOS Safari web browser.
The Safari web browser and the UIWebView do use different user agents.
The Facebook embedded browser doesn't seem to post hidden form values. And I can't seem to find any debugging tools for the embedded browser used in the iOS app.
I might not be 100% true on this one but i think Facebook might still be using this browser for the iOS app. But support for this library has been discontinued and has not been updated in over 2 years.
https://github.com/facebook/three20/wiki/Using-integrated-web-browser-via-TTWebController
So in short the answer to your question is Yes, but finding a solution for this issue is another story.
I haven't found anything yet...
Good Luck!
I am working on an application for Windows Phone 8 and I'd like to give the possibility to the users to login with their Facebook account, so they won't have to create an account on my application.
I saw the Facebook SDK for .NET and decided to use it because it seems to be really efficient and popular.
As a beginner, I followed the tutorial in the doc of the SDK : http://facebooksdk.net/docs/phone/tutorial/
I did the exact same thing that in the tutorial, everything is okay since I login. I click on the login button, I'm redirected to what they call the "FacebookLoginPage" in the tutorial (a .xaml with an empty grid so the webbrowser can fit in it), then appears the webbrowser with the Facebook page where I can type my login and password. After that, I'm redirected to the page that asks for permissions on my Facebook account, I click on OK. Everything is good so far.
And then comes my problem. I should be redirected to what they call the "LandingPage" in the tutorial, but instead of that I'm redirected to the facebook "login_success" (https://www.facebook.com/connect/login_success.html) which displays "Success" and also a security warning, and then nothing happens anymore...
I thought something in my code was not right so I spend a couple of hours working on it, didn't find anything. So I tried to run the sample application that they provide in the doc of the website, I just modified the Facebook AppID in it (I've put mine), and same thing happened.
I also tried other things that I found on the Nokia Developer Wiki, same thing.
So I think something is wrong with my Facebook Application, but I can't find what it is...
Is anybody could give me some help ? I'm dying here :(
I apologize in advance for my english mistakes, and I wish you a good day !
UPDATE : I finally did it following this tutorial http://developer.nokia.com/Community/Wiki/Integrate_Facebook_to_Your_Windows_Phone_Application
The redirect to "https://www.facebook.com/connect/login_success.html" should contain the accessToken as a url parameter, so if you allow navigating to this url it is indeed a security risk as it exposes the AccessToken. You need to listen for the 'Navigating' event from the WebBrowser control and if the browser is navigating to "https://www.facebook.com/connect/login_success.html" then you need to cancel the navigation and get the AccessToken from the url parameter.
UPDATE:
It looks like FB changed their OAuth login response from ...login_success.html#access_token= to ...login_success.html?#access_token= There is now a "?" character before the "#" character.
I've seen this in a lot of apps in the store recently so it's probably not you doing something wrong but rather a change by Facebook which hasn't yet been reflected in the SDK.
Have you tried using Windows Azure Mobile Services Authentication instead?
See guides at http://www.windowsazure.com/en-us/develop/mobile/how-to-guides/register-for-facebook-authentication/ and http://www.windowsazure.com/en-us/develop/mobile/how-to-guides/register-for-facebook-authentication/ for more information.
I'm using the LoginButton control of the Facebook SDK .NET for WindowsPhone and have the same issue.
I Fix it, downloading the project from github Facebook-WinClient-Sdk and changing the line 186 of FacebookSessionClient class, for this one:
Uri endUri = new Uri("https://m.facebook.com/connect/login_success.html?#access_token");
The team of facebook sdk for .net will be fix this issue for sure, but i have a demo today and need it works!
Friends
My task is using C# window application have to automatic login to site and on that first page which comes after login. there is link and after clicking on that link user can download excel file.
i can implement this like i can make exe of this and put it on my schedule and i ll set the time. so it automatically download the excel file.
i completed till login code but am facing problem after login it shows me security question page.
so how can i avoid this page? And when exe executed through scheduling then it don't have show any front end? so i have to hide front end so that is also remaing.
Any suggestion related to my concept or code will be very helpful to me.
The whole point of those security questions and captchas is to avoid exactly what you are trying to achieve and prevent access to the site from automated scripts and bots. If the authors of the website decided to put them on the website it is because they didn't want their website to be used the way you intent to use it. So I am afraid that there is no official and easy way to achieve this task.