• Resolved chrismillard

    (@chrismillard)


    Hi John,

    After getting WPBook Lite working, I thought I would try WPBook as it appears to have more features that I need.

    Since I don’t have SSL on my blog, I’m using https://fbssl.me to provide a URL.

    I’ve got my app set up on Facebook with the “Website with Facebook Login”, “App on Facebook” and “Page Tab” all configured.

    In WPBook, when I click on the “Checking permissions” link, it takes me to a Facebook page where it shows the following:-

    This page is where you can check and grant extended permissions, which enable WPBook to publish to your personal wall and/or to the walls of fan pages.

    The Facebook profile ID you are currently logged in to Facebook as is . You have defined <my FB used ID was here> as your Facebook user id in WPBook Settings.

    Your Facebook Profile ID must match the ID with which you are logged in to Facebook, or else an access token will not be stored and publishing to Facebook will fail. Please update the “YOUR Facebook Profile ID” setting in WPBook settings to match the userid shown above.

    FB profile has granted these permissions:
    ?read_stream – no
    ?publish_stream – no
    ?manage_pages – no
    ?user_groups – no

    An access token for this user has been stored.

    Stored access token is <long access token here>

    Active access token is <long access token here>

    You’ve indicated you wish to publish to this group: <my group id was here>

    ERROR: The user access token does not include publish stream and offline access permissions.

    To correct any of these, Grant or re-grant permissions for your userid. (This is required if you intend to publish to your personal wall OR any fan pages.)

    I click on the link to Grant or re-grant permissions but it doesn’t seem to work for me, and I therefore don’t know how to change the permissions.

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

Viewing 15 replies - 1 through 15 (of 45 total)
  • Thread Starter chrismillard

    (@chrismillard)

    When I enable the debug options of WPBook and check permissions, this is the error that appears:-

    This page is where you can check and grant extended permissions, which enable WPBook to publish to your personal wall and/or to the walls of fan pages.

    The Facebook profile ID you are currently logged in to Facebook as is . You have defined 902280384 as your Facebook user id in WPBook Settings.

    Your Facebook Profile ID must match the ID with which you are logged in to Facebook, or else an access token will not be stored and publishing to Facebook will fail. Please update the “YOUR Facebook Profile ID” setting in WPBook settings to match the userid shown above.

    FB profile has granted these permissions:

    Caught exception in getting permissions for user: Parser error: unexpected end of query.Error code: 601

    I wondered if it might be a browser issue, but it doesn’t appear to be.

    Plugin Author John Eckman

    (@johneckman)

    Hmm. Not sure what’s going on there. Note where you say “The Facebook profile ID you are currently logged in to Facebook as is .” – seems like it doesn’t have the right ID there.

    When you click “Grant or re-grant permissions for your userid” what happens? You said it doesn’t seem to work for you, but what is the experience?

    Are you re-using the same token you were using before for WPBook LIte? Same “application” in Facebook?

    I don’t know how the https://fbssl.me system works, but it seems like you’re not getting the right access token generated or stored.

    Plugin Author John Eckman

    (@johneckman)

    Actually I think this is a new bug – but I think that what is displayed is just wrong, and the access token you have may be just fine.

    Go to that “Check permissions page” the one which loads inside FB and tells you what your access token is.

    Copy the access token (big long string, make sure you get all of it) and paste it into Facebook’s access token debugger:
    https://developers.facebook.com/tools/debug

    I think what you’ll see is it has a ~2 month expiration and has all the right “scopes”

    i think what has happened is that this page showing status of the current token no longer reports the right status, which I will work on

    Thread Starter chrismillard

    (@chrismillard)

    Hi John,

    I’ve pasted the access token, and here’s what I get:-

    Application ID 538253799574754 : LJScotland
    User ID 100006480657592 : JogScotland Lochaber
    Issued 1376766667 (on Saturday)
    Expires 1381950667 (in about 2 months)
    Valid True
    Origin Web
    Scopes create_note manage_pages photo_upload publish_actions publish_stream read_stream share_item status_update user_groups video_upload

    and when I try to publish a post (with WPBook enabled), I get the following error:-

    No post id returned from Facebook, $fb_response was /n and $fb_page_type was and $wpbook_description was test and $my_title was test

    Plugin Author John Eckman

    (@johneckman)

    Chris – thanks for the update. I just tagged 2.6.4 in the SVN repo so you should see an update shortly – that will fix the “check permissions” page to show the right permissions.

    The question is why you are getting that response from Facebook.

    What kind of page are you trying to post to? Is it a fan page or a group? What is the PageID you have in your settings?

    In your WPBook settings inside WordPress are you publishing to your own personal profile AND to a page, or just a page?

    Thread Starter chrismillard

    (@chrismillard)

    Hi John – I’ve updated to 2.6.4 and the check permissions is now working ok, but I’m still getting the error when publishing a post to Facebook:-

    No post id returned from Facebook, $fb_response was /n and $fb_page_type was and $wpbook_description was test and $my_title was test

    On the Stream/Wall options, I have selected the option to “Publish new posts to the wall of this page/group:” and have put the correct ID in the Group ID field (132017353494120), and I’ve chosen to Publish as Posts.

    I am not trying to publish to my own wall.

    Plugin Author John Eckman

    (@johneckman)

    Ah, now we’re getting somewhere – thanks for the detail.

    Just tagged 2.6.5 – you may have found a bug that’s been there a long time but no one told me about issues posting to groups.

    Two things changed in 2.6.5 – to really test both, update and then generate a new access token from the permissions page. (I changed how the publish API is called but also requested the “publish_actions” permission I wasn’t getting before).

    Thread Starter chrismillard

    (@chrismillard)

    John – Updated to 2.6.5 but I’m still getting the error regarding No post id returned from Facebook….

    Thread Starter chrismillard

    (@chrismillard)

    I should just add to my above comment, that as part of my testing, I have deactivated all plugins except WPBook, I’ve also de-authorized the app in Facebook, then in the WPBook settings have checked the permissions and gone through the process of re-granting all permissions in Facebook again, but it’s still giving me the same No post id error….

    Plugin Author John Eckman

    (@johneckman)

    Hmm. I’m at a bit of a loss.

    In the past whenever this symptom has shown up ($fb_response was /n) it has been some kind of misconfiguration – either the group ID not being right, or the profile ID not being right, or the API key not being right.

    Do you have WPBook generating a debug log? (in the settings you can enable debugging)? Does it suggest anything useful?

    You can go to the Facebook Graph API explorer https://developers.facebook.com/tools/explorer/

    And you can paste in your access token, and try to do a “POST” request to /groupid/feed

    (where groupid is your groupid) and see if that gives you any more specific error.

    Unfortunately without some feedback from the Facebook API I can’t see what’s wrong here.

    Have you been able to post to your Profile (as a test) or to a page (as a test)?

    Plugin Author John Eckman

    (@johneckman)

    Is your user profile able to post to the group wall directly? (Not using the API?)

    Thread Starter chrismillard

    (@chrismillard)

    Using the Graph API explorer, I can post to the group feed ok.

    In WPBook, when I enable the option “Show errors posting to FaceBook stream”, this is the error that occurs when I try to post:-

    Caught exception in publish to group Invalid appsecret_proof provided in the API argument Error code: 0

    And these are the contents of wpbook_pub.txt – I tried publishing both with and without a feature image – both failed.

    2013-08-21 05:02:54 :Caught exception testing access_token: Error validating application. Cannot get application info due to a system error.Error code: 0
    2013-08-21 05:02:54 : publish_to_facebook running, target_admin is 100006480657592
    2013-08-21 05:02:54 : Post ID is 102
    2013-08-21 05:02:54 : My permalink is https://apps.facebook.com/ljscotland/test/
    2013-08-21 05:02:54 : Get Post Thumbnail function does not exist, or no thumb
    2013-08-21 05:02:54 : Post thumbail is
    2013-08-21 05:02:54 : Post share link is
    2013-08-21 05:02:54 : Publishing to personal wall, admin is 100006480657592
    2013-08-21 05:02:54 : Publishing as excerpt, is
    2013-08-21 05:41:34 :Caught exception testing access_token: Error validating application. Cannot get application info due to a system error.Error code: 0
    2013-08-21 05:41:34 : publish_to_facebook running, target_admin is 100006480657592
    2013-08-21 05:41:34 : Post ID is 105
    2013-08-21 05:41:34 : My permalink is https://apps.facebook.com/ljscotland/test-2/
    2013-08-21 05:41:34 : function exists, and this post has_post_thumbnail – post_Id is 105
    2013-08-21 05:41:34 : my_thumb_id is 73
    2013-08-21 05:41:34 : my_image is <full url to image was here>
    2013-08-21 05:41:34 : Post thumbail is <full url to image was here>
    2013-08-21 05:41:34 : Post share link is
    2013-08-21 05:41:34 : Past stream_publish, fb_response is
    2013-08-21 05:41:34 : Publishing to group 132017353494120
    2013-08-21 05:41:34 : Publishing to group, image is <full url to image was here>

    Plugin Author John Eckman

    (@johneckman)

    Hmm. That error:

    Invalid appsecret_proof provided in the API argument

    Would suggest that your “App Secret” was wrong – have you validated that this is properly stored, and hasn’t changed?

    Might be worth doing an “reset” on the app secret (which generates a new one) and making sure it is properly copied to and saved in the right place in the WPBook settings.

    Make sure the App ID and App secret are both fully copied, with no white-space on either end, and stored in the WPBook settings.

    Plugin Author John Eckman

    (@johneckman)

    Hmm. Looking at some Facebook documentation on “appsecret_proof” –
    https://developers.facebook.com/docs/reference/api/securing-graph-api/

    Can you check and see whether in the advanced settings for your facebook application you have “Require AppSecret Proof for Server API calls:” set to enabled?

    This should be disabled.

    That said, the Facebook API docs say that the PHP library (which WPBook uses) adds this ‘appsecret_proof’ automatically, so I’d still say look and see if you have the correct app secret

    Thread Starter chrismillard

    (@chrismillard)

    I’ve changed the app secret, and updated the settings in WPBook. There was no whitespace before or after the previous secret. Likewise there are no whitespaces before or after the new app secret that I have put in, but it still provides the same error message.

    Do you want to go to my Worpress site and create a login, and I can give you admin access to take a look at the setup?

Viewing 15 replies - 1 through 15 (of 45 total)
  • The topic ‘Cannot get WPBook working properly’ is closed to new replies.