• Resolved anneheathen

    (@anneheathen)


    My apologies if this has been posted about before – I searched but have been coming up dry.

    When I go to the Check Permissions link from wpbook to facebook, I get the following error message:

    ——
    This user_id has granted these permissions:
    Warning: Cookie names can not contain any of the following ‘=,; \t\r\n1314’ in /home/content/a/n/n/annearchy/html/blog/wp-content/plugins/wpbook/includes/client/facebook.php on line 677

    Caught exception in getting permissions for user: Invalid API keyError code: 101
    ——

    I have been following the instructions here: http://wpbook.net/docs/upgrade/
    and have already updated the API-Key to the App ID in my wpbook required settings.

    Any suggestions will be appreciated! Thanks in advance.

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

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

    (@johneckman)

    Hmm – have not see this before. Does the name of your Facebook App contain any usual characters?

    It’s pointing to a line directly in the facebook client, which is directly from their SDK.

    Can you try on a new browser or different computer? Maybe it’s an old facebook cookie that is causing trouble?

    In the meanwhile I’ll google a bit on that error and see if I can find anything.

    Plugin Author John Eckman

    (@johneckman)

    Note this other entry in the forums:
    http://wordpress.org/support/topic/wpbook-some-cookie-problam?replies=3

    Which says that trailing spaces after your App_ID or secret can cause problems – do you perhaps have some whitespace after your app_id?

    Thread Starter anneheathen

    (@anneheathen)

    Thanks for the ideas and the speedy response!

    FWIW, I had a pre-scheduled post that published after I posted this question, and oddly enough, wpbook is working – it posted to my facebook just like it should. I hadn’t expected it to work given the error message listed in my original post above, but I’ll take it!

    However, in the interest of figuring out what actually happened:

    I don’t have any non-letter characters in the name of my facebook app.

    I tried clicking the Check Permissions link using IE instead of Firefox and got the same error message. I hadn’t logged into facebook ever on IE and it did actually prompt me as it was recognized as a “new computer” under their security options (which I have set to alert me if my account logs in on a new computer). So I’m guessing that rules out any residual cookies being the culprit.

    I had seen that post about trailing whitespace and checked it earlier, and I just double-checked it again – I don’t see any.

    This doesn’t seem related, but I’ll mention it just in case: my usual setting for facebook is to have HTTPS browsing enabled. I had to change that in order to get anywhere with the Check Permissions link. When I have fb set to HTTPS browsing, it won’t load the Check Permissions screen at all – it just gives me a general error and says to try later. I discovered this through trial and error. It’s not a big deal to me to disable HTTPS for a few minutes while I make changes to my app, so it didn’t bug me much. Just mentioning it here in case it rings any bells with the other issue.

    Plugin Author John Eckman

    (@johneckman)

    Hmm. That does seem to eliminate any old cookies.

    What’s the url of your facebook application?

    What’s the url of your blog outside Facebook?

    Thread Starter anneheathen

    (@anneheathen)

    Plugin Author John Eckman

    (@johneckman)

    One tangential question – are you also using https to access WordPress admin?

    WPBook isn’t setting any cookies itself, but it seems like the Facebook client is trying to do so as part of logging you in to FB (which is part of being able to grant permissions, naturally, since you need to be logged in to do that).

    But the cookie thing says it is just a warning – the error I’m more worried about is the “Caught exception in getting permissions for user: Invalid API keyError code: 101”

    This says invalid api key, which means it is failing even when it tries to retrieve the permissions you already have, let alone grant more.

    There are some notes in the Facebook developer forums of this happening at random, though I don’t know what we can do it that’s the case.

    Are you certain your application’s ID is set correctly in WPBook settings? Used to be API_key, now should be app_id

    Thread Starter anneheathen

    (@anneheathen)

    I am not using HTTPS to access WordPress admin – I would actually like to but I haven’t figured out how to make that happen. (I’ve seen a plugin for making your blog or certain pages be HTTPS only, but I still want people to be able to use http if they desire.)

    I just double-checked my wpbook settings and it does indeed say app_id.

    Yesterday it did seem to work for one post, but today I had another post scheduled and it did not publish to fb, so maybe yesterday’s was a fluke?

    Plugin Author John Eckman

    (@johneckman)

    @anneheathen – Is it possible some other plugin is trying to set cookies? Specifically perhaps Facebook cookies?

    Are you running any other Facebook-related plugins at the same time?

    Could you try disabling all plugins but WPBook and just seeing if you get the same result?

    It’s strange as I’m not seeing it on any other blogs or test setups.

    Thread Starter anneheathen

    (@anneheathen)

    I just went through and deactivated all other plugins, though, and with only wpbook activated (no other plugins active) I get this same error message when trying to check permissions for wpbook:
    ——
    This user_id has granted these permissions:

    Caught exception in getting permissions for user: Invalid API keyError code: 101
    ——
    That stays the same until I reactivate the Google Analytics plugin at which point the cookie error comes back, so I think that’s the plugin responsible for the cookie error. But like you say, that’s not really the concern here, it’s the Invalid API message that seems to be the problem.

    I think I have discovered the root of that problem! I had the entire URL in the App ID, and removing everything but the ID number makes it work. I don’t know how I managed to miss this on all my previous attempts. What a d’oh moment!

    I was then able to re-grant permissions and tested it and it’s working. Thanks for all your help! My apologies again for such a rookie mistake.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘error on check permissions page: cookie names in wpbook php file?’ is closed to new replies.