Facebook like on logged-in website content

Posted on 2013-01-05
Last Modified: 2013-01-10

I have a list of products on a website. The website is built using PHP and mySQL. In order to view any part of a product page, a user must be logged into my website...if the user is not logged in then the login page loads up.

Each product has a Facebook Like button on its page, added using the IFrame method. The idea is that a "Like" will add a Facebook wall link to this exact product URL.

My problem is that when the Like button is pressed, Facebook posts that the signin page was liked, and not the actual product URL.

I can't allow non-logged-in people to see my products and I must also have the Facebook Like working as described.

Has anyone else ever had the same issue and found a way around it? The only thing I can think of is to show the page to non-logged-in users and hide/blur the content I don't want them to see.

Many thanks
Question by:kbit
  • 3
  • 2
LVL 53

Expert Comment

ID: 38746912
You have painted yourself into a corner.  The like is on the login page, and that is the url that is going to be sent.  It sounds like you are trying to force users to like things just to access them, and that kind of behavior really is a questionable practice that borders on scamming users.


Author Comment

ID: 38746925
The idea of having the like is to raise awareness of the site on Facebook.

If within Facebook, people click on a product that a friend of theirs liked, they arrive at my site and have the option of signing up, signing in or ignoring.

There is no scam, all I'm trying to do is get Facebook to show the content I want it to show.

It's extremely similar to arriving at an Experts Exchange question and not being able to view the solutions unless you sign up/in.
LVL 53

Assisted Solution

COBOLdinosaur earned 500 total points
ID: 38747023
It's extremely similar to arriving at an Experts Exchange question and not being able to view the solutions unless you sign up/in.

Yeah well in case you didn't notice EE does not show up much in searches any more, because Google de-index all content that was blocked by the pay wall and downgraded the ranking of the site.  That is also what they will do to you.

As for Facebook they are not going to let you post whatever link you want when someone clicks on the login page.  They are only going to post the product url if the like button is on the product page and the user clicks it.

"There is no scam, all I'm trying to do is get Facebook to show the content I want it to show."

That in fact is scamming you are trying to lie to Facebook about where the user click the like button so you can post links to promote your products.  Facebook is in the advertising business, they are not going to let you post your ads unless it is within the limits of their ToS.  If you want ads on Facebook, they will be happy to sell you a campaign.  They are not going to let you force users to like things involuntarily; and I suspect the first time someone complains about it they will block you.

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


Accepted Solution

kbit earned 0 total points
ID: 38747050
Well thanks for the comments anyway, particularly the one about Google lowering the website's rank...I'll pass this on to the website's owner.

Through trial and error it seems that once your webpage can display the Facebook meta properties, it's enough to be shown correctly on Facebook. So for now I've put in an IF statement on the webpage that tells the user they must sign up/in in order to view the product. This allows the Facebook like to like the correct page (and show the product name and image) without showing all my product's details.
LVL 109

Expert Comment

by:Ray Paseur
ID: 38747191
I noticed that you have a close request pending for this question, but I'd like to offer one anecdote from last year's MoDevDC conference on navigation and client relations.  One of the presenters told us about an experiment which took the "register/sign-in" component of a well-known ecommerce site completely out of the buying process.  The client was anonymous right up to the point of entering shipping and payment details.  When the conversion rate (actual purchases) for this experiment was benchmarked against the site's earlier requirement to register before creating a shopping cart, it was discovered that the value of moving the "register" button from the front of the shopping experience to the back of the shopping experience was $300,000,000 per year.  The site now sends a follow-up email a few weeks after you have received your products, asking you to review the products and give feedback.  That's where your Facebook "like" button should go.

Who is this smart company that figured out how to sell without appearing manipulative?

Author Closing Comment

ID: 38762298
Came up with a workaround as described above

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question