Notice: The Monaca & Onsen UI Community Forum is shutting down.
For Onsen UI bug reports, feature requests and questions, please use the Onsen UI GitHub issues page. For help with Monaca, please contact Monaca Support Team.
Thank you to all our community for your contributions to the forum. We look forward to hearing from you in the new communication channels.
How can I implement buttons for social networks?
-
Hi everyone,
I’m starting with Onsen UI and I don’t know a lot about JavaScript, so I’m a bit lost. I’m doing an app for a company and I have some buttons linking their social networks. For example, I have the Facebook button and if I click, I would go to the Facebook page of the company. I also have buttons for Twitter, LinkedIn and sending an e-mail.
I tried to install inappbrowser plugin but I have an error because it says my project isn’t a Cordova project.
Thank you.
-
@fjmarmol How about trying Monaca? With it it’s simpler to add Cordova plugins to your project, either with the cloud or the local tools. Make sure to visit their side of the Community if you run into trouble.
-
Thank you, I thought Monaca was another framework. It’s the best way to program Onsen :)
-
Hi again.
I’m trying to open the official app of some social networks when I click a button. In other words, if I click a button, it would open a Twitter profile in the Twitter app.
Thank you.
-
@fjmarmol You should be able to use something like this:
window.location = 'instagram://media?id=' + id; window.location = 'fb://post/' + id;
This plugin lets you check if the app is installed: https://github.com/ohh2ahh/AppAvailability because if it is not, you will need to do something different, like redirect to the actual website.
-
@fjmarmol said:
rting with Onsen UI and I don’t know a lot about JavaScript, so I’m a bit lost. I’m doing an app for a company and I have some buttons linking th
https://community.onsen.io/topic/363/quick-script-for-social-sharing-and-app-availability