Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Facebook like on logged-in website content

Posted on 2013-01-05
Medium Priority
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
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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.

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


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 111

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

Enroll in October's Free Course of the Month

Do you work with and analyze data? Enroll in October's Course of the Month for 7+ hours of SQL training, allowing you to quickly and efficiently store or retrieve data. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

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

In this article, you will learn how to create custom audiences using your own email lists. You can use this custom audience as your target audience for advertising on Facebook. This allows you to advertise to your existing audience. Once you've crea…
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

610 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