I made a button to share on Facebook, when clicking it opens the Facebook UI window, but it is not working on the iPhone.
I do not have an iPhone to test and I'm having trouble finding the error.
Here is the code I'm using:
function shareDialog() {
var url = window.location.href;
var title = $("meta[property='og:title'").attr('content');
var description = $("meta[property='og:description'").attr('content');
var imageUrl = $("meta[property='og:image'").attr('content');
FB.ui({
method: 'share_open_graph',
action_type: 'og.shares',
hashtag: '#kimaneiro',
action_properties: JSON.stringify({
object : {
'og:url': url,
'og:title': title,
'og:description': description,
'og:image': imageUrl,
'og:width': 1200,
'og:height': 630,
}
})
},
// callback
function(response) {
if (response && !response.error_message) {
//
} else {
//
}
}
);
}
$(".Btn--facebook-share").click(shareDialog);
Does anyone have an idea of what might be happening?