WordPress.org

Ready to get started?Download WordPress

Forums

Facepress fp-oauth.php Error on Line 29 (22 posts)

  1. tonecapo
    Member
    Posted 2 years ago #

    Whenever anyone tries to login using their facebook account I receive "Cannot use object of type WP_Error as array in fp-oauth.php on line 29" I don't know anything about PHP and I've been trying to change line 29 somehow to make it work, no success yet. Thank you for reading!

    [Code moderated as per the Forum Rules. Please use the pastebin]

  2. tonecapo
    Member
    Posted 2 years ago #

    I know there is more info you need to solve I just don't know what to give you guys

  3. tonecapo
    Member
    Posted 2 years ago #

    Users receive the following error when trying to log into my site with their facebook accounts:

    "Cannot use object of type WP_Error as array in fp-oauth.php on line 29"

    I am using the most current version of WordPress 3.1.2 & Facepress Ver1.1

    I am using Theme 2010
    I deactivated all plugins issue still exists
    i am using mysql
    PHP 5.x
    IIS 7
    GoDaddy is the host

  4. tonecapo
    Member
    Posted 2 years ago #

    The site is Capospizza2.com if you live in the cleveland area and help me solve the issue there is pizza in it for you! Thank you to anyone that reads this!

  5. tonecapo
    Member
    Posted 2 years ago #

    What is wrong with the array on line 29, I feel like the answer is dangling there, in front of my facce. my noobness is preventing me from seeing it.

  6. Louy Alakkad
    Member
    Posted 2 years ago #

    Seems like wp_remote_get() is returning an error...

    can u please add this right after line 27:

    if ( is_wp_error($token) )
       echo $token->get_error_message();

    tell me what message do you get and then remove it :)

  7. tonecapo
    Member
    Posted 2 years ago #

    Yes let you know immediately THANK YOU so much!

  8. tonecapo
    Member
    Posted 2 years ago #

    SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

    Fatal error: Cannot use object of type WP_Error as array in D:\Hosting\2091513\html\capospizza\wp-content\plugins\fp\fp-oauth.php on line 32

    I really can't thank you enough for taking the time to do this...

  9. Louy Alakkad
    Member
    Posted 2 years ago #

    try replaceing line 27 with this:
    $token = wp_remote_get($url,array('sslverify'=>0));

    hope it works :D

  10. tonecapo
    Member
    Posted 2 years ago #

    Now I get:

    Fatal error: Cannot use object of type WP_Error as array in D:\Hosting\2091513\html\capospizza\wp-content\plugins\fp\fp-oauth.php on line 35

    Where should I insert`if ( is_wp_error($token) )
    echo $token->get_error_message();`

  11. Louy Alakkad
    Member
    Posted 2 years ago #

    Line 27:
    $token = wp_remote_get($url, array('sslverify' => false) );
    Line 34:
    $test = wp_remote_get('https://graph.facebook.com/me?access_token='.$t['access_token'], array('sslverify' => false) );

  12. Louy Alakkad
    Member
    Posted 2 years ago #

    try replacing the 2 lines above

  13. tonecapo
    Member
    Posted 2 years ago #

    I copied and pasted in the code. It takes me back to the login page and shows a red error box above the Username field that says: Error: Facebook user not recognized.

  14. Louy Alakkad
    Member
    Posted 2 years ago #

    make sure to link your profile in wp-admin/profile.php page

  15. tonecapo
    Member
    Posted 2 years ago #

    anytime i revisit the login page (whether or not i am logged into FB) it shows the red error field and say Error: Facebook user not recognized.

  16. Louy Alakkad
    Member
    Posted 2 years ago #

    login with ur username and passwd... go to your profile page, and click the login with facebook link :)

    if you can't login, try cleaning your cache.

  17. tonecapo
    Member
    Posted 2 years ago #

    I can see about half of wp-admin/profile.php the bottom half reads this

    Fatal error: Call to undefined function tp_options() in D:\Hosting\2091513\html\capospizza\wp-content\plugins\fp\fp-login.php on line 8

    Screen Cap here:
    http://capospizza2.com/ProfileError.jpg

  18. Louy Alakkad
    Member
    Posted 2 years ago #

    okay this looks like a typo :$
    change tp_options to fp_options in fp-login.php line 8.
    i'll put this fix in the next version :)

  19. tonecapo
    Member
    Posted 2 years ago #

    If you could give me the fp-oauth.php code again I can show you whats happening. I had an issue after i linked the account in the wp-admin/profile.php. I could only login to capospizza2.com using the FB account that was logged into wp-admin/profile.php

  20. Louy Alakkad
    Member
    Posted 2 years ago #

    oh well... the plugin only allows registered users who have linked their fb account to login with that account...
    the register with facebook feature is not yet done... if that's what you want you've gotta wait...

  21. tonecapo
    Member
    Posted 2 years ago #

    Ohhhhhhhhhhhhhhhhhhhh OK, so a only a registered user of my blog can login with their facebook account?

  22. Louy Alakkad
    Member
    Posted 2 years ago #

    yes.

Topic Closed

This topic has been closed to new replies.

About this Topic