A standard Facebook button code would be to like a specific URL (page) . In this case it’s a WebYep template page so I would not know what is going to be after the ?post=
How do you approach this problem? Or is there Facebook code that will grab the current page URL using javascript?
Hi David,
Normally I’d suggest creating a patch Action that sits on the page and updates the regular Softpress Facebook Actions with dynamic links. Annoyingly the Like Button Action runs so late in the publishing process (fwAfterEndHTML) that we can’t change any of the code that the Action creates unless we fork the Action and edit it ourselves. I’m reluctant to do that as I’d need to maintain an almost identical Action to the original.
You could do as you suggest and use JavaScript on the page to get the current URL and insert this into the Facebook like button when the page loads although as you are using PHP I’d be inclined to do all of this on the server. The following PHP should echo the current page URL for you;
Have a play around with the iframe width and height settings in the code and add this to your Freeway page as a markup item and you should be set.
Regards,
Tim.
On 29 Aug 2013, at 09:59, David Owen wrote:
How do you make a Facebook like button that can link to a template php page
A standard Facebook button code would be to like a specific URL (page) . In this case it’s a WebYep template page so I would not know what is going to be after the ?post=
How do you approach this problem? Or is there Facebook code that will grab the current page URL using javascript?