When I call the hello.login it opens a new window on the browser. Is there a way to replace the current window and on the call back refresh the window to the app window. I would have liked a seamless look and feel in the Single Page App that I am building.
Thanks,
Raj
I just figured it out. It can be set in one of the parameters of the login as below:
hello.login({display:'page'})
Raj
Related
we have a CRM-like application written in GWT/GXT with help of our library which wraps some GXT widgets like ComboBox or Grid from GXT to simplify interaction with relational database. When the application starts a user have to log in and after successfully login the user can see main horizontal menu and some welcome information. If the user want to do something (e. g. to find a customer) he/she has to click somewhere in the menu and a new GXT modal window appears. Now we want to give the user a possibility to open a new session (e. g. to handle a second customer and visually compare customer's data with the first customer) in a new browser window.
How to do it?
Best Regards,
Jacek
The best way I know to comunicate between browser tabs is to use HTML 5 localStorage. Here is a good tutorial. In GWT you can use gwt-storage to easily manipulate the localStorage.
If you want to open a new Window or browsertab you will need to solve two problems:
You will need to specify the session. This can be done by simply create some kind of session token-cookie. This should be flagged with http-only for security reasons). New windows will send the same cookie (and the user is logged in)
You need to specify the item, you want to show. This can be done by using the history API and store the token in the URL
I am currently using the Freshplanet Facebook-ANE and was wondering about something that is bugging me currently.
I want to implement a simple post to wall feature inside my app, and this ANE does exactly what I want, except for one thing. When I do the actual post to wall dialog, it pops up just like I want it, in a WebView inside my app. The login takes me to Safari or the Facebook app if I have it installed, which is what I want to avoid.
Here's the line I'm using to open the session :
Facebook.getInstance().openSessionWithPublishPermissions(POST_PERMISSIONS, OnSessionOpened, true);
That works perfectly for posting, but takes me outside of the app.
I've tried using the same .dialog() function I use for the post, and it worked, but I can't seem to post to the wall afterwards (maybe I'm not correctly catching the access token or something)
Any help would be appreciated. I believe I've set up everything correctly on my Facebook App page, and that my AS3 project is correctly setup.
Thanks for the help !
If you want to strictly stay into the app, you must use StageWebView. It's something like a wrapper of HTML page inside Flash.
First check if you are logged in (this is code from Facebook.as of FreshPlanet):
/** True if a Facebook session is open, false otherwise. */
public function get isSessionOpen() : Boolean
{
if (!isSupported) return false;
return _context.call('isSessionOpen');
}
If there is no session - start the web view. Otherwise - continue as usual.
You have to keep in mind that StageWebView is pretty.. how to say it.. bad is the kindest thing I could say :) You must implement your own close button, listen for url changing, etc.
You could look into Facebook AS3 SDK, which at least has some kind of 'platform' for the web view..
Good luck!
I m using history listener for forward and back browser button.But i m not able to find out history back button click.If any idea plz rply..urgent for me...Thank you..
Your code can use the tokens sent by History management system to determine what kind of action you want to take. Suppose you are at page1 and that page is identified by the token 'page1'. Now, you move to page2. If you click the back button, you will receive the token 'page1'. You can use this to set the state related to page1. See this Google doc for more info.
I have a problem that I am opening the "http://itunes.apple.com/in/app/eft-feel-happy-fast/id474157386?mt=8" type of url on a table view didSelectrowIndexPath, then app store open and user can download my app but the problem is that I want to go back to my application from the app store how is it possible can any one help me?
Thanks in advance.
If you open safari and leave your app, you cannot control what happens next. The user will return to your app when he/she chooses to.
Don't use default browser of device,you can't come back from that. For this create new class and use webBrowser. By the help of this u stay in you app.....
You can use SFSafariViewController class to redirect the links within your apps and make sure that the user doesn't leaves the app. Here is a tutorial on how to do it.
SFSafariViewController Tutorial
PS- It is written in swift.
I am using sharekit 0.2.1, and I am facing an issue after the first wrong login. The scenario is like this:
open sharing view and try to login with wrong credentials.
close the sharing view or double tap the login button.
open sharing view and login with real username and password, try to share something.
This is when bad things start to happen:
-The white sharing view wont disappear until the little X in top right corner is pressed.
-I am getting this posted on facebook
instead of getting
If the sharing window wasn't closed (ensure that step 2 is done) everything works as intended.
Can anyone help me solve these issues?
Yes, had to rebuild everything myself. And it was easier than I thought, and way more robust than sharekit.