WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: WPBook] require_login() (7 posts)

  1. Tifa
    Member
    Posted 4 years ago #

    Hi,

    I'm using this plugin and I already created my application. So far everything is working great. And I recently stumbled one application in facebook. When i view the application's page on facebook. I can see the page without logging into facebook. I asked the facebook forums and it says that its possible if i dont use the require_login(). Where can i see this?

    thanks

    http://wordpress.org/extend/plugins/wpbook/

  2. Brooke Dukes
    Member
    Posted 4 years ago #

    Mardie,

    We require login around line 51 of wpbook/theme/config.php you can play around with the lines starting at

    $facebook = new Facebook($api_key, $secret);
    $user = $facebook->require_login();

    Keep in mind that if you are to update WPBook your changes will be overwritten to make sure you keep a backup copy of your changes.

  3. Tifa
    Member
    Posted 4 years ago #

    thanks Bandon. But if i do this and go to my app.facebook url i get a blank page. I think its because the user needs to click "allow" first. But since no notification comes out, its blank.

    Anyway, is it possible to make it "allow Facebook Application" by default?

    thanks

  4. Brooke Dukes
    Member
    Posted 4 years ago #

    If I read that right it looks like you must require login for the app to work. see:http://wiki.developers.facebook.com/index.php/Authorizing_Applications

    I think pages are set up more like profiles where they can be set to "public" but because an app can read a users data (their name, profile picture, etc) then it requires authorization. I could be wrong on this but that's what I'm getting from a quick Google search.

  5. Tifa
    Member
    Posted 4 years ago #

    ok, thanks. I think it would be best that I will not edit require_login(). At least the applications's about page is public. I can add a html page in there.

    one last thing, is it possible that if user is not logged in to facebook and they will view my application's url (i.e. app.facebook) it will go to the application's about page instead of the "require login"?

  6. Brooke Dukes
    Member
    Posted 4 years ago #

    I'm not sure if you can redirect if not logged in, i'm sure you may be able to write a simple if statement, such as

    if (check to see if not logged in) {
    redirect to the app about page
    }

    I'm not sure exactly how to do this but it theoretically should be possible.

  7. Tifa
    Member
    Posted 4 years ago #

    ok ill try that out. And thanks for your time.

Topic Closed

This topic has been closed to new replies.

About this Topic