- This topic has 9 replies, 5 voices, and was last updated 13 years, 9 months ago by
support-michael.
-
AuthorPosts
-
MolxMemberHi,
I’ve been trying to add a Tweet/Facebook Share button to my app, but I can’t get it done. I’ve read that javascript window.open(url) do not work on Standalone pages.
Is there any manner to open a Safari window (e.g. to use window.open(‘http://twitter.com/home?status=’+tweet)), or to connect to the social networks?
Thanks.
February 7, 2011 at 11:20 am #314300
support-michaelKeymasterHi,
I asked someone here that has bigger web-nuts than me to help research this. I’ll let you know as soon as I know something.
Wayne
Genuitec Mobile TeamFebruary 7, 2011 at 12:53 pm #314303
support-remiMemberYes, you can just create a link as _blank (new window) using this link:
http://www.facebook.com/sharer.php?u=http://www.genuitec.com
Just replace “u” value with the needed URLSame for Twitter, but remember that a tweet is only 140 chars.
url value will be auto shorten, text value can be everything (including links). Note that Twitter sharer also provides an URL shorterer inside its sharer window
http://twitter.com/share?text=Google&url=http://www.genuitec.comHope this help!
R.
February 7, 2011 at 2:27 pm #314307
MolxMemberThanks for your answer Remi.
But is it possible to add html properties to the link paremeter of the button? How?
It if isn’t, what’s the solution? Change the html after generated? That wouldn’t be practical considering I would have to change it everytime I change the design.
I would suggest that you add the target property just above the link for buttons and links, I supposed it wouldn’t be much trouble.
February 8, 2011 at 9:35 am #314327
support-michaelKeymasterThanks Remi,
I experimented with this approach for opening a separate safari window. I set the Link property to this snippet of javascript:
javascript:window.open(‘myurlhere’,’_blank)
the real value I tried is:
javascript:window.open(‘http://www.facebook.com/sharer.php?u=http://genuitec.com’,’_blank)
Wayne
Genuitec Mobile TeamFebruary 9, 2011 at 3:24 pm #314376
MolxMemberThx wayne, it worked (I just had to ad the ‘ that you forgot after the _blank!)
I also wanted to add a variable value to the post, and I figured out how to do it by myself. Here is the code I used:
javascript:window.open(‘http://twitter.com/?status=My variable value is ‘+myvariable+’ ,right?’,’_blank’)
javascript:window.open(‘http://www.facebook.com/connect/prompt_feed.php?&message=My variable value is ‘+myvariable+’ ,right?’,’_blank’)I used ‘?status=’ and ‘/connect/prompt_feed.php?&message=’ cause I don’t want to send links.
Both seem to be working fine, the only issue I had was that if I tried to use textbox.value as the variable the link wouldn’t open, so I created a variable with the value.
If you wanna see what I’ve been working on (just for testing, as long as it stays uploaded):
http://mobioneappsync.appspot.com:80/get/166ec1f70826408dac13a0ffc5e1ffb8/main.htmlFebruary 19, 2011 at 11:30 am #314630
support-remiMemberHiu Moix,
Did you found a solution? I think a form.formname.inputname.value could work, but could be tricky with multiple lines or special chars. The only thing to get is the name element value given by codegen to your form & input
R.
September 29, 2011 at 9:50 pm #320076
mezoMemberThanks for the code, however it didn’t work with at all, either from home screen or calling the app link within safari.
I badly need this option to work, any help please will be highly appriciated.October 8, 2011 at 7:12 pm #320327
LaendledesignMemberThis message has not been recovered.
October 10, 2011 at 4:39 pm #320366
support-michaelKeymasterThis message has not been recovered.
-
AuthorPosts