• Resolved Andreas Dobos

    (@andreas-dobos)


    Hi,

    got this error code and these debug lines:

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 91

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 103

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 118

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 141

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 147

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 154

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 168

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 174

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 316

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 428

    Warning: fwrite(): supplied argument is not a valid stream resource in /var/www/vhosts/area4.at/httpdocs/blog/wp-content/plugins/wpbook-lite/includes/publish_to_facebook.php on line 462
    Caught exception publishing to page as Post: Error validating access token: The session has been invalidated because the user has changed the password.Error code: 0

    It is the last version and I think I follow of your instructions and suggestions in the forum. Sometimes it works (like yesterday) and today it doesn’t. Intermittently I’m asked to renew the access token altough it says that one is stored. FB App ID: 228637370591193

    Can you help, please?

    https://www.ads-software.com/extend/plugins/wpbook-lite/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author John Eckman

    (@johneckman)

    The fwrite() warnings are happening because wpbook lite can’t write a debug file to the wpbook-lite directory.

    I thought I’d taken care of checking all of those, but I guess I missed some in that include – either way they are just warnings and can be ignored. (Though it does mean you won’t get a debug file).

    The last one:

    Caught exception publishing to page as Post: Error validating access token: The session has been invalidated because the user has changed the password.Error code: 0

    Suggests that there is definitely something wrong with your access token.

    When you visit your WPBook Lite settings page inside WordPress, it should tell you that an access token has been stored for your profile, AND that one has been stored for the page you are trying to publish to.

    If it doesn’t, you need to fix that first by regenerating the token. (In WPBook Lite that link is on the settings page).

    If it does, then check those tokens (both of them) using the Facebook Access Token debugging tool:

    https://developers.facebook.com/tools/debug/access_token

    That will tell you whether the access tokens WPBook Lite is storing are correct.

    In between it working yesterday and today not working, did you change your Facebook password? Doing so invalidates access tokens.

    Is it your personal Facebook profile ID that is stored in the “YOUR Facebook ID” part of WPBook Lite settings? Does that profile have admin rights to the page to which you are trying to post?

    Plugin Author John Eckman

    (@johneckman)

    What’s odd about the fwrite() warnings is that wpbook does check to see if the file pointer fp is valid early on and then defines a debug variable to false, which should then stop trying to write.

    It almost seems like it did have access and then that access was lost along the way?

    Is there a wpbook_pub_debug.txt file in your wpbook-lite directory?

    Plugin Author John Eckman

    (@johneckman)

    Nevermind, I found the error which is causing the frwite() warnings – fixed in github, will push to svn with next release.

    For now it isn’t causing any real issues – the error referring to the changed password is the real error here.

    Thread Starter Andreas Dobos

    (@andreas-dobos)

    Hi,

    it is weird because I really have no clue why it doesn’t work. Sometimes it works, sometimes not. It worked for days and suddenly it havent’t worked anymore.

    I didn’t changed my password for FB.

    The Access Token is stored (no indication if it is only for the page and/or profile) and says:
    Application ID
    [redacted] : area 4 | Blog
    User ID
    [redacted] : Andreas Dobos
    Issued
    1342510634 (Tuesday, 17 July 2012 at 09:37)
    Expires
    Never
    Valid True
    Origin Web

    But in the setup I get this message: Could not get accounts list from Facebook. The access token could not be decryptedError code: 0

    I have my private FB Profile and run one for my company for which I’m the only administrator. Here are my two profiles:
    https://www.facebook.com/andreas.dobos
    https://www.facebook.com/area4Markenkommunikation?bookmark_t=page

    I don’t want to post to my company profile with my real name so I use the same ID for the Facebook Profile ID and Page ID.

    There’s no debug file in the directory.

    Regenerating the token doesn’t change anything.

    I hope you get enough information from. If you need more, please tell me what you need. I can send you screenshots if you want?…

    Thanks

    Andreas

    Plugin Author John Eckman

    (@johneckman)

    So the andreas.dobos one is an actual profile:

    See: https://graph.facebook.com/andreas.dobos

    That profile’s ID is 100001799295757

    The other one I believe is a PAGE not a profile

    see: https://graph.facebook.com/area4Markenkommunikation

    You said above:

    I don’t want to post to my company profile with my real name so I use the same ID for the Facebook Profile ID and Page ID.

    WPBook and WPBook lite absolutely require that what you put in the “YOUR profile” field is an individual account.

    That doesn’t mean you have to post AS your profile – but it does mean that the access token comes from an individual’s account. If that individual has the right to post as the page, WPBook will do so.

    This is why you’re getting the error – because WPBook is using as a user access token what is actually a page access token.

    Try putting your actualy profile ID in the “your profile ID” setting, and putting the page ID in the page ID setting, then uncheck the “publish to your profile wall” and check the “publish to this page” – then generate access tokens again.

    Thread Starter Andreas Dobos

    (@andreas-dobos)

    Hi,

    thanks for the answer. I can follow you but: Why did it sometimes work out and sometimes not? This is weird.

    But I will try your tip and then I will see, if it will work out or not.

    thx

    Andreas

    Plugin Author John Eckman

    (@johneckman)

    Because Facebook’s API responses are inconsistent and change all the time.

    It’s likely that it was working in some cases where it should not have been, and Facebook has tightened up its checking.

    Or it stopped working because they finally disabled some deprecated feature.

    Not really sure, since it depends significantly on:
    – Facebook API responses (which are inconsistent)
    – Your application’s Facebook settings (which change all the time)
    – Your WPBook settings in WordPress (which people often configure “wrong”)

    Plugin Author John Eckman

    (@johneckman)

    Andreas – try 1.5. There was a bug in 1.4.x related to storing access tokens.

    I don’t know for certain if it was included in your issues, but it most likely was.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: WPBook Lite] Error Code: 0’ is closed to new replies.