My application (C# winforms) constructs an email and sends it to a customer. To the email there is a photo attached.
What i want to do, is to add a facebook share button into the e-mail so the user can share the attached photo on facebook by clicking this share button.
I already managed to construct the e-mail with the photo attached. I manage also to add a facebook share button to e-mail, but i cannot figure out how the attached photo can be uploaded and shared on facebook through a single url.
The url (which is attached to the share button) i came up with, which is pretty close to what i want:
href=”http://www.facebook.com/sharer.php?u=
‘img src=”http://www.somesite.com/apicture.jpg” />
but this requires the photo to be uploaded to somesite.com before this will work, and that’s not what i want.
Any clues?
If you want to share an image then you must have a url of it, you can’t share by uploading.
You can first upload the image to facebook (for example) but you won’t be able to do that from withing the email, and the user will have to authenticate in order to do that, and so you won’t be able to do that from where you send the mail (if I understand the scenario right).
What you should do is to have the image on the server where you send the mail from (or another server in your disposal), and then use that url with the share button.
Another thing that you should take into account is that the share button has been deprecated and is no longer supported by facebook, as it says here:
And here:
In your specific case it will be problematic to use the like button since it requires the facebook js sdk which can not be attached to an email.