Solved

Facebook like on logged-in website content

Posted on 2013-01-05
6
496 Views
Last Modified: 2013-01-10
Hi,

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
0
Comment
Question by:kbit
  • 3
  • 2
6 Comments
 
LVL 53

Expert Comment

by:COBOLdinosaur
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.


Cd&
0
 

Author Comment

by:kbit
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.
0
 
LVL 53

Assisted Solution

by:COBOLdinosaur
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.

Cd&
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Accepted Solution

by:
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.
0
 
LVL 108

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?

Amazon.com
0
 

Author Closing Comment

by:kbit
ID: 38762298
Came up with a workaround as described above
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simplest php form 3 57
Form not operating correctly. 1 22
How can I echo a PHP variable in AJAX function? 7 28
Scope of $_SESSION 17 25
Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

929 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now