语言

Menu
Sites
Language
return to my webApp from browser

I have html5 game. To post smth on facebook I made a simple web page. How can I return to my game after making post? without asking user to press "back" button.

Thank you, in advance) 

响应

4 回复
konduri sai swathi

Hi,

After the code for posting on facebook use application control lo get back to your application. Use below code :

function onsuccess() {
     console.log("The application has launched successfully");
 }
tizen.application.launch("appID", onsuccess);

Replace "appID" with the ID of your application. Add "appliction.launch" privilege in congif.xml file.

Alex Kysil

Thank you, but I'm afraid i described my problem not clear enaugh. Facebook connection page is a remote web page? and it's opening in browser window. I need simply close browser window from JS(on Facebook connection page) or "say" smt to system or my main app. but how?

Alex Dem

Hi,
Maybe you could use iframe tag inside you Web app to post something on facebook.
If you have opened URL from your Web App using window.location.replace (for example) you will unable to return to placed on local File system Web app due security.
please look at this article:
https://developer.tizen.org/forums/web-application-development/webview-webapp
It could be useful.
Alexey.

Alex Kysil

thanx, i'll try it;