IBM Worklight 6.0 - Desktop Browser environment does not work in Facebook - facebook

I have created a simple application using Worklight v6.0 and dojo (1.9 version) and I want to put this app on facebook. I've followed these steps:
Created a Worklight project and application
Configured the dojo library
Added the Desktop Browser environment
Configured my app on facebook based on this Information Center article
I've put this URL as the Canvas URL parameter:
http://host:port/apps/services/www/application_name/desktopbrowser/ but the app doesn't load and Facebook is returning The server refused the connection.
the desktopbrowser environment is running on my localhost browser and an external machine can access to my app.
Is there anything that I must do in Worklight v6.0 or in Facebook to make it work?

The Canvas URL is missing the Worklight Server's context root, for example:
http://myHost:10080/fbtest/apps/services/www/fbapp/desktopbrowser/
Where fbtest is your context root, which is your project name by default.
In my tests the app was successfully loaded and displayed:
Make sure to also setup the publicWorkLightHostname in server\conf\worklight.properties.
See if that helps.
See full-size image here: http://i.stack.imgur.com/D2xEI.png

Related

How to open page directly in Ionic 4 from url

I have a project in Ionic 4, when I do ionic serve it runs at localhost:8100/
Now when it loads home page, the URL is localhost:8100/home, if I open contact page the URL becomes localhost:8100/contact.
When I try to copy the above URL and hit, then it says -
Sorry, this page doesn't exist. Please check the URL or go back a page.
What do I need to do to get this working?
Based on your comments this is happening because your server does not support fallback. So when you enter a url manually, the server is trying to find that page, but you only have index.html in your app because of Client side routing.
If the app uses the Angular router, you must configure the server to
return the application's host page (index.html) when asked for a file
that it does not have.
The configuration is specific to your server or cloud platform. You can check Angular deployment for more info.
This regularly should not happen and you can't do anything for this. Try to upgrade your ionic to the latest with nodejs since the error my be from currupted project creation. Then after update create a new project and it should go good.

How to test SAPUI5 apps locally in apache tomacat installed in eclipse?

I am working on SAPUI5 app which was created long back and running successfully. Now I need to do some enhancements and for that I downloaded the app and uploaded in eclipse.
Now when I am running this app locally - It is not working as the XMLHTTP Request says 404 (Not Found) when accessing the backend OData service.
URI is : /sap/opu/odata/sap/Z****SRV";
I understand that I need to add http://<host>:<port> before URI.
But I cannot change it in all the places. I found out that we can write <param-value> in web.xml file but I did and still it is not working
Can someone guide me how?

IBM MobileFirst issue with securityTest="wl_unprotected" in IBM Containers

My adapter is running in an IBM Container. I have marked all my procedures as securityTest="wl_unprotected".
Everything works fine locally when testing with browser simulation, but fails when I try the same after deploying both the app and adapter in container.
I do get my first page pulling data correctly, but subsequent calls for navigating to other pages of the application fail. All I see is following error messge
http://134.168.16.88:9080/MobileFirstStarter/authorization/v1/clients/preview?applicationId=econfig_poc_mf&applicationVersion=1.0&environment=common&isAjaxRequest=true&x=0.06548149750907506
With status as "404 Not Found"
I am not sure why this is failing in a container but working fine locally
In an external server environment there is no preview available - the servlet that allows previewing of an application is not present, which is expected.
Previewing applications is available only in the development environment, locally.
If you'd like to preview your application once moving to an external server environment (QA, UAT, Production... bluemix or not), you'll need to test it in a device. Alternatively you could add the Mobile Web or Desktop Browser environments as well, which will allow previewing in the browser (but of course may not have all capabilities available to a Mobile app).

Debugging a GWT application in a remote environment

I have deployed my GWT application to its target environment (i.e. compiled and copied the war directory contents to the target device's /var/www) and some parts of it are not working. I understand that I can debug my local instance of the GWT app as if it were running in the target environment, by opening the deployed GWT App URL and adding gwt.codesvr URL parameter to it, like this:
http://deployment_host/gwtapp.html?gwt.codesvr=localhost:9997
I get
Plugin failed to connect to Development Mode server at localhost:9997
Follow the underlying troubleshooting instructions
My Chrome browser is running on the same machine as Eclipse, so localhost above should be ok. Just to make sure, I've added -bindAddress 0.0.0.0 in the Run/Debug configuration in Eclipse and tried with my external IP/hostname, with no change, except that the error message is updated accordingly. What am I doing wrong?
If I replace deployment_host with localhost above everything works fine, but it's of no use to me to debug locally. (There is some Proxy and ReverseProxy-ing going on in the local Apache, so I do not need the 8888 port when running locally, but this should be unrelated)
Questions Debugging GWT applications outside of dev mode? and Debug GWT application in a remote browser are related but do not help.
If you are using chrome, look in the address bar at the right for a grey GWT icon. In any other browser, you would see a popup message confirming that you want to debug, but in Chrome this apparently isn't possible.
Click the icon, and it will ask you to whitelist this site as allowed to run Java locally on your computer. After you whitelist it, it should run correctly.
Along the same lines as the answer above Ive just had some success restarting the extension helped (but restarting browser hadnt)
Just enable and disable it in :
chrome://chrome/extensions/
Good luck! It's the only thing wrong with GWT imho...

New session on every page view when running Facebook application in IFrame in IE and Azure

I am developing a Facebook application and I am using Facebook C# SDK v4.2.1 to help with authentication. I am building the application using ASP.NET MVC 2 and am hosting it in Windows Azure (SDK v1.2).
Everything has been running fine when I had my application in a full browser window, but now when I am attempting to IFrame it in Facebook, I run into session problems. The behavior is that a new session is created on every new page request so the user always comes back to the application's login page. I can see that that Facebook session is valid when Facebook redirects back to the application after authorization, but when I set some session variables and redirect to another page, the session is gone.
When I debug the application locally, both as a standalone web application and in the Development Fabric, everything works fine. It is only when it's published to Azure that I get the problems. I have tried to have a local debug environment that is very similar to production where I have the facebook application at apps.facebook.com/myappnamedev that points to localhost on a specific port.
I just now also discovered that I only see the problem in IE (I am using v.8). Firefox v3.6 and Safari v.5 works fine.
Any ideas to help my troubleshooting? I have spent 10 hours on it and it's getting really frustrating... I am happy to paste code/configuration info if needed, just let me know.
Thank you in advance!
// Peter
I solved this. The redirect from Facebook after authentication landed on different pages in my development environment compared when deployed to Azure. I moved my authentication logic to global.asax instead.