0

We have the "like page" code on our site now (from facebook dev page), but I've noticed the javascript sdk is slowing page speed of our site (another external request!).

Rather than including the javascript sdk, I'm wondering if it's possible to just have a link attached to a button. On our current "like page" button, when I click it, I get this in the url of the popup:

https://www.facebook.com/login.php?next=https%3A%2F%2Fwww.facebook.com%2Fplugins%2Ferror%2Fconfirm%2Fpage%3Fiframe_referer%3Dhttps%253A%252F%252Fwww.lifeleap.org%252Fis-my-relationship-right-for-me%252F%26kid_directed_site%3Dfalse%26secure%3Dtrue%26plugin%3Dpage%26return_params%3D%257B%2522app_id%2522%253A%2522%2522%252C%2522channel%2522%253A%2522https%253A%252F%252Fstaticxx.facebook.com%252Fconnect%252Fxd_arbiter%252Fr%252Fj-GHT1gpo6-.js%253Fversion%253D43%2523cb%253Df246ad6b1a27112%2526domain%253Dwww.lifeleap.org%2526origin%253Dhttps%25253A%25252F%25252Fwww.lifeleap.org%25252Ff15a3bdc42a846e%2526relation%253Dparent.parent%2522%252C%2522container_width%2522%253A%2522370%2522%252C%2522hide_cover%2522%253A%2522false%2522%252C%2522href%2522%253A%2522https%253A%252F%252Fwww.facebook.com%252Flifeleap%2522%252C%2522locale%2522%253A%2522en_US%2522%252C%2522sdk%2522%253A%2522joey%2522%252C%2522show_facepile%2522%253A%2522false%2522%252C%2522show_posts%2522%253A%2522false%2522%252C%2522width%2522%253A%2522350%2522%252C%2522ret%2522%253A%2522sentry%2522%252C%2522act%2522%253Anull%257D

When I paste this url into a browser, it requests a login and then provides the correct facebook page giving a choice to "like" the page. Although it's dirty, it does work.

Been searching everywhere for a guide, explanation, or tutorial for accomplishing this, but have found nothing.

Does anyone have any suggestions for how to better implement such a link? Is it a matter of stripping out some of what is there? If I have to use a link like this, I'd at least like to get it as general and short as possible.

  • This is a programming question... and are you sure you want a like button without the counter? – bArmageddon Dec 19 '18 at 1:07
  • This question appears to be off-topic because it is about web development which is off-topic at Pro Webmasters. Web development questions may be asked at Stack Overflow but be sure to read their FAQ before posting to ensure your question meets their guidelines. – John Conde Dec 19 '18 at 1:25
1

Thats a programming question...

But it's you lucky day :)

<a href="javascript:window.open(url,'like','height=280,width=400');">Like</a>

and replace url with that url to facebook's like.

That's for a "Like" link that opens a popup, you'll have to style it (an image of like button, or css design of it)

| improve this answer | |
  • Sorry - I guessed I posted this in the wrong place. I re-posted in Stack Overflow. – andrew5555 Dec 20 '18 at 4:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.