Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Yes, that line’s okay to a point. $result returns:

    array(3) { ["session_key"]=> string(34) "a1a1a1a1a1a1a1a1a1a1a1-111111111" ["uid"]=> string(9) "111111111" ["expires"]=> string(1) "0" }

    (*) values altered, obviously.

    As you can see, there’s no $result[‘secret’] value though, which is picked up next in the code.

    The code gets past this point and then calls:

    wordbooker_set_userdata( $onetime_data,$facebook_error, $secret, $session_key);

    In here is where things next go wrong. The INSERT query generated fails; debugging the code to get the query it’s trying to execute and then executing that query directly into MySQL Query Browser pulls up the problem in my last message. The database schema sets NO NULLs for most of the fields in the table and doesn’t have any default values; subsequently, the insert query that’s only populating six fields fails. This makes me wonder how the query ever works for anyone, yet clearly it does.

    And a follow-up: I seem to have got past the Invalid Parameter issue. Why? I haven’t a clue. It’s not as if I’ve changed any code; simply added more debug lines. Anyway, it now returns the value from wordbooker_fbclient_getsession() but cannot extract $secret from the response. $session_key it gets. $secret, however, is blank. Does this make a difference? I don’t know but I do know that the wordbooker_set_userdata() function now fails to do anything. Debugging again and pasting the generated SQL into MySQL query browser returns:

    Field 'facebook_id' doesn't have a value

    And I can see that’s true. The Insert query inserts user_ID , onetime_data , facebook_error , secret , session_key , blog_id but nothing else. facebook_id, I can see, is defined as NOT NULL in the db schema but there’s no default value so it is null at insert time. Question: do you have default values in your schema? Is your MySQL configured to ignore nulls?

    Very frustrating. I can install and setup Wordbook with no problem but Wordbooker can’t get past the “getting an infinite session from Facebook” part. This occurs both locally (WP2.8.5, WinXP, IIS, PHP5+) and remotely (WP2.8.5, Win2003, IIS, PHP5+). At the settings page I’m prompted to enter the session code; whatever I enter returns me to that page. Adding debug code seems to indicate that wordbooker_fbclient_getsession() throws an exception “100 – Invalid parameter” and so subsequently never writes the details to the database to allow me to get any further. The puzzling thing is, as I’ve said, installing Wordbook works and the code around this part looks identical. I’ve made sure that databases created in MySQL for each plugin are deleted between installs. I’m hoping that you might be able to shed some light on this because it’s got me stumped. I’m familiar with (though not expert at) PHP, but not WordPress. I’m hoping after all this that the plugin does what I’m expecting which is that it will be able to post WordPress updates to a fan page wall, something I simply cannot get to work with any other thing I’ve tried.

Viewing 3 replies - 1 through 3 (of 3 total)