I want to send users from my website to a group on Facebook. I do not want the group to be opened in a browser, but in the Facebook App. I am using the following Javascript:
<script>
userAgent = navigator.userAgent || navigator.vendor || window.opera;
if(/iPad|iPhone|iPod/.test(userAgent) && !window.MSStream) {
window.location = "fb://profile/123456789101112";
} else if(/android/i.test(userAgent)) {
window.location = "fb://profile/123456789101112";
} else {
window.location = "https://www.facebook.com/groups/groupname";
}
</script>
This works fine on iOS (i.e. opens the Facebook group in the Facebook app), but not on Android ("Content not available").
Any idea how I can achieve this on Android?