Facebook Force Log in – gather data – get liked!

Wednesday, May 5th, 2010

It seems that everyone is having an easy time installing the Sociable Facebook Plugin, but are having a horrible difficult time getting their WordPress installations to hide content unless they have liked your page and logged into facebook.

I spent several hours pouring over all I could find about the facebook API, the new open graph stuff, etc… and trying to hide stuff on my site unless the viewer was logged into facebook just wasn’t working well. I could hide content but I sure couldn’t show a lot of content and it broke the moment I added any html code.

I did figure things out and I’ll show you below………. but you are going to have to leave a comment by logging into facebook for me to tell you about it :)

Do this:

Login with facebook below.
Give this website access to some of your facebook public info (normal all apps do it).
Control+Refresh the page… or click on any other post and then come back to this one

Do all that and you will see the content (and how it’s done) for this post.

Black Hat Digest Newsletter – A Must Read!

Popularity: 30% [?]

Tags: , , , , , , , , , , , , , ,

12 comments on “Facebook Force Log in – gather data – get liked!”

  1. [...] Force Facebook Login To Hide Content [...]

  2. I should note that you can’t force people to “like” your page this way. But you could ask them to login with facebook and like it – then refresh the page.

    90 percent of the people would do it.

    I’ll try out the api again in a couple weeks – seems to be a problem stopping it from working properly at the moment.

  3. Interesting, I click “Login with Facebook” and it refreshes the page, but still shows “Login” and requires that I enter my name and email to leave a comment. Weird.

  4. Oh, but after I left the comment, it shows me logged in through FB. Might want to check into that Ed.

  5. It sure isn’t perfect. That’s for sure. This is the best way you have of doing it with WP for now though.

    The best bet is to make a real application that uses the oauth system and totally ignore WP altogther.

    This is a lot faster if it does have a few hiccups.

  6. good stuff

  7. [...] with facebook</p></li> </ul> Of course you do need the plugin we talked about here or to have them register with your blog through WP’s normal log in [...]

  8. Nice.
    Won’t work with regular readers though, if they’re already registered and logged in.

  9. Not working for me

  10. not working for me either

  11. i dont get it. i’ve already logged in with facebook but the login button is still there

  12. Doesn’T work for me…where’s the info???

Leave a comment

Login with Facebook:

Who is New?

Once You Know, You Newegg

Facebook Activity

Become Our FaceBook Fan!

Facebook Fans

Last Users

Last users on Black Hat SEO Digest!