There is a website that has an authorisation widget via telegram. It works through a third-party browser, but webview -- an error pops up.
I tried using webview, inappwebview, launch with launch.
I am trying to load HTTPS url in ionic app.
I had tried to use iFrame but it shows error
Refused to display in a frame because it set 'X-Frame-Options' to 'SAMEORIGIN'
Used IN app Browser but its useless it shows extra UI that i dont want to.
Do you have any other idea to load HTTPS in ionic app.
I want to read the contents of a page opened with Flutter webview. Before the page opens, the user needs to manually enter the information on the previous page, and I have no chance to do this in the background with http. How can I get the data on the opened page with WebView (which can be webview_flutter or flutter_webview_plugin). Thanks in advance.
There is nothing out of the box exactly for that purpose, however, webview_flutter supports communicating with the page using JavascriptChannel. Using controller.evaluateJavascript, you can inject a script that sends the page content to the channel using postMessage. See the examples in the plugin repo.
I have a doubt in Ionic webview.
For example: if am creating an app like paytm, then after clicking 'proceed to pay' button, it'll redirect to the webview of some payment gateways --> after that the gateway gives a response, which we get in our app.
Here, while redirect to the gateway webview what kind of parameters to be send and what kind of responses we can get back from the webview.
Thanks in advance!
You can send a thing like a cart unique id to the webview via get params.
Example : http://www.example.com/cart?id=1234
And you can get something, like payment ok with a specific url
http://www.example.com/cart/success
And track that url to get out of the gateway.
I have a web site already integrated with Facebook login, using server-side authentication.
I have an issue to turn it into an application running under Facebook.
The problem is that Facebook does not show the authentication page at all
Therefore, I am not even getting to the server authentication process for real.
Right now, the application is running on my local machine.
My app is defined as Facebook Application: (adding blank before localhost for site security purpose only)
Canvas URL: http ://localhost:4300/fbopt/
Secure canvas URL: https ://localhost:4303/fbopt/"
[same problem happens when running in a Sandbox, without Secure URL]
I have a "fan page" with "Go to App" button there.
Pressing a button leads me to the URL:
https://apps.facebook.com/[appid]/?fb_source=timeline
The browser starts loading the page with the frames.
The lower frames makes the POST request to the URL I provided.
My application redirects the page to the following URL:
https://www.facebook.com/dialog/oauth?client_id=[appid]&redirect_uri=https://localhost:4303/fbopt/hook&scope=email,user_location,user_birthday
I would expect Facebook to show up the application authentication form, with the permissions required.
Unfortunately, this does not happen. An empty page is shown within the frame, HTML is empty!
I see (from the Chrome network debugger) that the URL is indeed accessed, but the response is with HTTP 200 status (not error), but no response data. Instead, getting
X-Frame-Options: DENY
response header - rendering denied within frame! Why?
When loading the URL above "manually" outside the Facebook frames structure, I do get the authentication screen with the right permissions.
I wonder what is missing to get it work with canvas.
Any hint on what I should add, or how to debug such a problem - will be appreciated.
Thanks ,
Max
Looks like me fundamental problem was that I was trying to redirect the whole page, instead of making a frame redirection.
Started here:
Blank Canvas => 'Refused to display document because display forbidden by X-Frame-Options.'
Went here:
https://developers.facebook.com/docs/howtos/login/login-for-canvas/
It says:
Because your application is being loaded in an iframe, returning a 302 to redirect the user to the Login Dialog will be unsuccessful. Instead you must redirect by setting the Javascript window.top.location property, which causes the parent window to redirect to the Login Dialog URL
This was probably my major mistake.
Max
Do you have iframe in your app? Sending X-Frame-Options with content DENY is Facebook's way to fight with clickjacking. More info:
http://darklaunch.com/2010/11/09/facebook-s-anti-clickjacking-techniques
adding an iframe to facebook does not work anymore since ~2 weeks
I've had the same issue. 302 Redirect works because I use a lot of those but you cannot redirect to a facebook domain for any reason. If you want you can do a top redirect via javascript. What I did is I created an html that accepts a url and it loads it in top.location then redirects back to apps.facebook.com. With X-frame most probably because you have a AntiForgeryToken (if using .net) because this would insert xframe sameorigin in the header. You can disable this with
AntiForgeryConfig.SuppressXFrameOptionsHeader = true;