WordPress.org

Ready to get started?Download WordPress

Forums

Social
Facebook connect error (47 posts)

  1. gcoghill
    Member
    Posted 2 years ago #

    Got this error message when trying to connect my FB account:

    Warning: Attempt to assign property of non-object in /home/USER/public_html/blog/wp-content/plugins/social/social.php on line 2285

    Fatal error: Cannot use object of type stdClass as array in /home/USER/public_html/blog/wp-content/plugins/social/social.php on line 2288

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

    http://wordpress.org/extend/themes/social/

  2. ttj90
    Member
    Posted 2 years ago #

    Exactly the same here..

  3. gcoghill
    Member
    Posted 2 years ago #

    OK so it's not just me then, that's good to know. I noticed the MailChimp "app" on FB does indeed get installed on FB. I tried deleting that and re-approving, but same error.

  4. ttj90
    Member
    Posted 2 years ago #

    I also have the red reminders telling me to update my settings. I do, but I still get the reminders on every page in the Admin of my blog.

    It seems that they don't connect at all.

    I'm unsure whether it's the theme I'm using or another plugin I'm using but I don't believe I have one that's likely to conflict.

  5. holling
    Member
    Posted 2 years ago #

    Also having issues with Facebook. The connect process never finishes. Twitter works like a charm, though.

  6. gcoghill
    Member
    Posted 2 years ago #

    @holling Same here, Twitter worked without a hitch, and I love the plugin. Want those FB folks to be able to do the same.

    Ah, Facebook.

  7. Ryan Hendra
    Member
    Posted 2 years ago #

    Same here. Anybody had any luck with this issue?

  8. gcoghill
    Member
    Posted 2 years ago #

    I'm guessing it's either a plugin conflict or a glitch in the code. I don't have anything else connecting to FB save for the Like/Send buttons on the blog. But I do have a problem with plugins :)

    Anybody test this on a vanilla install?

  9. MarinaDoc
    Member
    Posted 2 years ago #

    I've the same problem. Everything is fine if I connect to Twitter, but it is impossible to FB

  10. Rodolfo Sánchez
    Member
    Posted 2 years ago #

    Hi folks! yesterday, for the first time I tried this plugin and I met the same problem. A shame, because the plugin is pretty good. So I decided to fix it and I did!

    This is my solution:
    Have to patch the following file:
    wp-content/plugins/social/social.php
    Replace this code (lines 2275-2300):

    private function social_kses($object) {
    	if (($is_object = is_object($object))) {
    		$_object = new stdClass;
    	}
    	else {
    		$_object = array();
    	}
    
    	foreach($object as $key => $val) {
    		if (is_object($val)) {
    			$val = $this->social_kses($val);
    		}
    		else if (is_array($val)) {
    			$val = $this->social_kses($val);
    		}
    		else {
    			$val = wp_kses($val, array());
    		}
    		if ($is_object) {
    			$_object->$key = $val;
    		}
    		else {
    			$_object[$key] = $val;
    		}
    	}
    	return $_object;
    }

    And presto! Greetings to all!!!!!!!!!!

  11. ttj90
    Member
    Posted 2 years ago #

    Now I've just got to figure out where it begins!

  12. Rodolfo Sánchez
    Member
    Posted 2 years ago #

    ttj90; in the file wp-content/plugins/social/social.php, replace the code from line 2275 to 2300 for this:

    private function social_kses($object) {
    	if (($is_object = is_object($object))) {
    		$_object = new stdClass;
    	}
    	else {
    		$_object = array();
    	}
    
    	foreach($object as $key => $val) {
    		if (is_object($val)) {
    			$val = $this->social_kses($val);
    		}
    		else if (is_array($val)) {
    			$val = $this->social_kses($val);
    		}
    		else {
    			$val = wp_kses($val, array());
    		}
    		if ($is_object) {
    			$_object->$key = $val;
    		}
    		else {
    			$_object[$key] = $val;
    		}
    	}
    	return $_object;
    }
  13. ttj90
    Member
    Posted 2 years ago #

    Any tips on how to find the line 2275!?
    I'm quite the inept developer

  14. gcoghill
    Member
    Posted 2 years ago #

    Awesome! Will give this a try tomorrow when I get home. Thanks!

  15. Rodolfo Sánchez
    Member
    Posted 2 years ago #

    Using a tool such as notepad++
    Here is the download link ""

  16. Rodolfo Sánchez
    Member
    Posted 2 years ago #

    Sorry; Este es el enlace de descarga

  17. Rodolfo Sánchez
    Member
    Posted 2 years ago #

  18. Rodolfo Sánchez
    Member
    Posted 2 years ago #

    Finally JAJAJA
    Good luck!!

  19. ttj90
    Member
    Posted 2 years ago #

    Thanks but it seems that there's a problem with the download link. I'll check CNET.

  20. Rodolfo Sánchez
    Member
    Posted 2 years ago #

  21. ttj90
    Member
    Posted 2 years ago #

    Nice one. I think that's job done.
    Now to figure out why I'm constantly getting the red message on every backend page on updating the settings.

  22. Ryan Hendra
    Member
    Posted 2 years ago #

    @Rodolfo: You da man! Thanks.

  23. gcoghill
    Member
    Posted 2 years ago #

    I got this error after tweaking the code:

    {"result":"error","response":"an error occurred"}

  24. ttj90
    Member
    Posted 2 years ago #

    I'd follow it again. I've not had an issue since.
    Rodolfo Sánchez, you're a legend. Many thanks again.

  25. gcoghill
    Member
    Posted 2 years ago #

    Aha, I had updated the code while the plugin's settings page was opened. Modded code, went back to Social's settings page, connected to Facebook no problem.

    Thanks again Rodolfo!

  26. MarinaDoc
    Member
    Posted 2 years ago #

    million thanks! you're all right!!

  27. okso
    Member
    Posted 2 years ago #

    @Rodolfo Sánchez gracias, thank you! d

  28. rhythmdoctor
    Member
    Posted 2 years ago #

    Anyone know if the plugin developer is going to update this thing?

  29. Philcomputing
    Member
    Posted 2 years ago #

    @Rodolfo Sánchez,

    I changed the file. Focebook works now. Unforunately the Twitter integration produces the following errors:

    Warning: Invalid argument supplied for foreach() in /kunden/sassen.org/webseiten/phil/wp-content/plugins/social/social.php on line 2283

    Fatal error: Call to a member function account() on a non-object in /kunden/sassen.org/webseiten/phil/wp-content/plugins/social/social.php on line 710

  30. David Radovanovic
    Member
    Posted 2 years ago #

    broken here too!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags