Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by MATRIXREAL

hi
i just finish my game and run it on xcode
it work wonderfull ... i am happy really thanks ejecta team ....

i just want to add externel link (share score on facebook or twitter) using externel link

i know that this is code to add ejecta.openURL( url, title )

but where i have to put it ???

iam using construct 2 ejecta plugin ... there are option (action) to open url ...

when i run my app on xcode (or on my phone) and i try to touch the button to externel link ... it show me the message (open browser) bt nothing happpen when i tick ok ...

thanks in advance

1 decade ago by stillen

Had this problem, so I made this plugin:

https://github.com/stillenklipse/EjectaCheckUrl

In the example I check for the FB app, then if it is installed, it opens Facebook app to your games fan page. You can use this same idea to go to actual web pages or check for other apps installed.

1 decade ago by MATRIXREAL

ok thanks i will try it later
what about twitter ?

1 decade ago by stillen

http://handleopenurl.com

Thats a list of the common URLs for iPhone apps. You can use any of the URLs with the pluggin. Twitter has a similar URL pattern for pages.

http://handleopenurl.com/scheme/twitter

1 decade ago by MATRIXREAL

thanks for reply
but excuse me i dont understand where i put this code
if( window.ejecta ){
var OpenUrl = new Ejecta.OpenUrl('fb:');
if(OpenUrl.isUrlSafeToOpen() == "true"){
OpenUrl.openPassedUrl();
}
}else{
console.log('facebook not installed')};
}
???

1 decade ago by stillen

I would assume, you would want this code to be used as the action of a button. I am using it as the action for my games FB button.

If the user touches the FB button, the action is almost that exact code. I just instead off doing the console.log I open safari, since that is on every iphone.

1 decade ago by MATRIXREAL

hi
thanks for reply
maybe we dont use same methods to work
i use construct 2 to make game and after i export to ejecta ...
this why i dont know where to put it ...

1 decade ago by stillen

The JS code above will not work in construct, but it is simple JS so it can be adjusted to work. I'm not 100% familiar with the construct set up. I could help you out if you want to share the game code somewhere, not publicly.

1 decade ago by MATRIXREAL

thanks for reply
i will do it as soon as possible
Page 1 of 1
« first « previous next › last »