Quote machine, sharing a quote on FB

Quote machine, sharing a quote on FB
0

#1

Has anyone managed to do this? I have been investigating but am getting lost up a rabbit warren.

Here is what I was attempting (minus the quotes):


#2

Hmm, clearly FB is not as popular as I thought!


#3

Hi @JohnnyBizzel,

I haven’t actually used it yet on any of my projects, but you may want to look into the Facebook SDK. I read up on the docs and it looks like there is a function you can use to have the Share Dialogue pop up. You’ll have to make your own button and get the Share function to run when the user clicks on it.

https://developers.facebook.com/docs/sharing/reference/share-dialog

This is the setup guide:

https://developers.facebook.com/docs/javascript/quickstart

Good luck! I’ll let others correct me if there is an easier way :smile: .


#4

Thanks for the reply. I read that page and the problem related to the quote machine is that you can’t pass in the quote text, just a URL. So it is less flexible that sharing to Twitter.
The way you could do it is to use a query string parameter so you could specify the quote as part of that but then you need code to select that quote on page load.
Tricky.