I have this group of share buttons in my website:
<div class='post-share'>
<a class='share-twitter' expr:href='"https://twitter.com/home?status="+data:post.url' id='tuiter' onclick='ga('send', 'event', 'click', 'tuiter');' target='_blank'><i class='fa fa-twitter'/></a>
<a class='share-google-plus' expr:href='"https://plus.google.com/share?url="+data:post.url' id='gugleplus' onclick='ga('send', 'event', 'click', 'gugleplus');' target='_blank'><i class='fa fa-google-plus'/></a>
<a class='share-pinterest' expr:href='"http://pinterest.com/pin/create/button/?url=" + data:post.url + "&media=" + data:blog.postImageUrl + "&description=" + data:post.title' id='pintresti' onclick='ga('send', 'event', 'click', 'pintresti');' target='_blank'><i class='fa fa-pinterest'/></a>
<a class='share-linkedin' expr:href='"http://www.linkedin.com/shareArticle?mini=true&url=" + data:post.url + "&title=" + data:post.title + "&summary=&source="' id='linkdini' onclick='ga('send', 'event', 'click', 'linkdini');' target='_blank'><i class='fa fa-linkedin'/></a>
I would like to add also a Facebook Send button. I see in bbc website that they have a custom Send button:
My difficulties related to a custom Send button are related to the fact that i'm working in a blogger blog platform.
I know i can use something like:
<a class='share-facebook' expr:href='"http://www.facebook.com/dialog/send?u=" + data:post.url + "&title="+ data:post.title' id='tuiter' onclick='ga('send', 'event', 'click', 'tuiter');' target='_blank'><i class='fa fa-facebook'/></a>
but actually this is not working. API Error Code: 100
I tried also:
<a class='share-facebook' expr:href='"http://www.facebook.com/dialog/send?link=" + data:post.url + "&title="+ data:post.title' id='tuiter' onclick='ga('send', 'event', 'click', 'tuiter');' target='_blank'><i class='fa fa-facebook'/></a>
but when i test it i get this message: "The link you followed may have expired, or the page may only be visible to an audience you're not in."
My question is:
The code for the custom send Button will be like -
<a expr:href='"https://www.facebook.com/dialog/send?app_id=YOURAPPID&link=" + data:post.canonicalUrl + "&redirect_uri="+ data:post.canonicalUrl' >Send</a>
You will need to create a new Facebook app to make it work.
For information regarding the required parameters by Send Dialog, refer to https://developers.facebook.com/docs/sharing/reference/send-dialog -
app_id - Your app's unique identifier. Required.
redirect_uri - The URL to redirect to after a person clicks a button on the dialog. Required when using URL redirection.
link - Required parameter. The URL that is being sent in the message.