Update parent URL from an embedded GWT app? - gwt

We are building a new app in GWT. This app will needed to be incorporated into an existing app. The server hosting the GWT app will be different than the server hosting the existing app. To get around the SOP issue, we plan to embed the GWT app in an iframe within the existing app. We would like to use history tokens to record page changes within the GWT app. This works fine, i.e. the back and forward buttons in the browser work as expected, EXCEPT that the URL of the parent page embedding the GWT app does not change to reflect the history token changes. Is there any way to modify the parent page URL from the GWT app embedded within an iframe? Any help would be greatly appreciated! Thanks!

Found techniques to do so here: http://softwareas.com/cross-domain-communication-with-iframes. This is not specific to GWT but is doable in GWT. I tried the "Marathon" version and it works.

Related

Displaying a Facebook Page Plugin in Flutter

I am working on an application in Flutter for a client. They are wanting to promote their Facebook page for their business, the page is open to the public and doesn't require login. On their site, they're already using the Facebook Social Plugin to promote their Facebook feed. I am wanting to use the Social Plugin or something similar to it for consistency.
I have tried grabbing the iFrame from Facebook's Social Plugin creation page and hosting it in a WebView via Flutter. The problem is this leads to a bunch of different errors and a repeated Attempt to remove non-JNI local reference, dumping thread console log. I already know that the WebView wasn't built to handle an iFrame like this, but I don't know where else to turn in-order to view the Facebook Page. I have also tried to just display the URL link in the WebView without any of the HTML tags and had no luck. Any suggestions?
You can simply use webview_flutter plugin to display the web page on a Flutter app. Note that webview_flutter plugin is yet to have support for web. If you're also planning to deploy your app for web, what I did was I rendered the page using HtmlElementView, following this post.

Is it possible to create multiple facebook SDK instances on a single page without conflict?

I'm working on an application that can be embedded in other pages using an iFrame that requires facebook permissions. The problem is we're running into issues when trying to use the facebook SDK to login from inside an iFrame on iOS (the login window never appears). We're running code on the parent page that places the iFrame, so my question is, can I place our SDK on the parent page without conflicting with any existing Facebook SDKs on that page?
can I place our SDK on the parent page without conflicting with any existing Facebook SDKs on that page?
No, you can’t. The JS SDK can only be embedded and initialized once.
The problem is we're running into issues when trying to use the facebook SDK to login from inside an iFrame on iOS (the login window never appears)
The whole JS SDK popup login flow is not the most suitable for mobile in many cases.
You might have better luck implementing the manual login flow, https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow
If you open that in a new window, you’d have to find a way to close it again, and have the iframe notified that successful login has happend. (Perhaps postMessage before closing the login window.)
Another possible option would be to redirect in the top window (instead of opening a new window/popup), and then after login back to the 3rd-party site, that loads your iframe again. (But not all people using your plugin on their page might like that.)

Does it violate Apples TOS to use AppMobi and ASP.NET MVC

I'm thinking of using APPMobi to push to the IPhone. APPMobi allows you to code in html and javascript and tap into your phone's functions.
This opens up the obvious desire to code an ASP.NET MVC app that calls these javascript methods.
I wondering if this behavior would violate Apple's TOS because they wouldn't have control of how we update our site.
No it does not. Ignore the person about about "downloading code at runtime" - it doesn't pertain to html/javascript/css.
The issue is if your page does a redirect to your site only. You're best bet is to design the UI in html/javascript and let that live in the app bundle, then use web services to make calls to get data.
Apple will deny your app if it's just you're mobile website embedded.
you can't download code at runtime, except for html/css/javascript.
this means you can have a webview showing pages from your site. of course if it's just a view on your site maybe someone in Apple could argue you should do a webapp instead...
i mean: if they don't allow you to dowload web pages they should ban safari, but if your "app" works perfectly from a browser you risk they refuse it.
hope this help.

Facebook External Widget development with a single app

We're trying to develop a widget that uses Facebook APIs and other websites (e.g different domains) could embed. We do not want every website to create it's on Facebook app but we'd like everyone using this widget to be connected to our Facebook app.
The problem is that Facebook seems to authenticate only a specific domain for an app (Canvas URL).
Ideas?
Guy
Update: I just realized that for Facebook server API as long as I set the redirect_uri to a valid URL (as defined by the site url) then everything is OK. So I can let my widget call the login and set the redirect_uri to some page we hold on our server that will communicate with the origin. So far so good. Now the problem that remains is whether there's a way to do it using the Facebook JS sdk rather then having to invent the wheel. From what I see there I could find a way to make the JS SDK not use the window.location.href. Ideas?
you just need to create the app, then from the profile site of your app there is an link to let users add the app to their page. (this is also possible via a special link (see the docs))
but be aware, one page can only include your app once. so if you like your "customers" to have your app multiple times on the same page you have to create multiple apps but point the canvas and tab url to the same script.
The other way would be to add child applications directly for the user, so you can let your customers even set a customized icon. This is hard to code couse you have to use old apis (newer one doesnt support the functions anymore) and there is none to null documentation for it. (I have such an app running, if you want to see some examples drop me a note)

facebook tab fbml and dynamic content

Per the new profile/fan page tab rule that eliminates the iFrame option, is there a way to dynamically generate content for a given tab? I've seen methods that wrap a canvas app (but requires a user to click to load content), but I want to show updated content thats managed on my servers. I thought you could also update the FBML using the Graph API, but haven't been able to find anything on that.
You can display static FBML on Application Tabs which is dynamically generated, you just can't auto-load anything that's dynamic on the client side (until the user clicks something)
You'll need to make sure you setup the application to be installable to pages as well.
Go here for help on all things social media, especially FBML.
www.facebook.com/fanpagefactory
ask questions to the community or in the 24/7 live chat (you will get a timely response either way)
Enjoy.