• Resolved crossfitec

    (@crossfitec)


    Hi,

    Firstly, great instructions on setting up this application (and I’m not being sarcastic) they are very easy to follow, especially compared to other similar apps around.

    When I try and generate the access token I’m getting the below error:

    An error occurred with CrossFitEC_Post. Please try later

    API Error Code: 191
    API Error Description: The specified URL is not owned by the application
    Error Message: Invalid redirect_uri: Given URL is not permitted by the application configuration.

    What have I entered wrong here?

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

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

    (@johneckman)

    Thanks @crossfitec – it is hard to keep up with all the changes FB makes to their setup screens.

    What is the URL of your blog outside FB?

    What do you have set as the canvas page of your blog in Facebook application settings?

    What is the url you get when you click on “generate access token” (what is the link destination, not what you get directed to).

    Most likely it is some kind of mismatch between what Facebook believes the domain controlled by your app to be and where the “redirect URI” points to – which means somewhere a disconnect between what WordPress (and WPBook) think the blog address is and what Facebook thinks the application domain is.

    Sometimes this is as simple as http://www.domain.com versus domain.com, sometimes it is because of http://www.domain.com/blog/ versus http://www.domain.com or the like

    Thread Starter crossfitec

    (@crossfitec)

    Plugin Author John Eckman

    (@johneckman)

    You have your canvas url set to http://www.elitecron.com.au/crossfit-2/ (including the /crossfit-2/ bit) but your redirect_uri (inside the link for generate access token) points to http://www.elitecon.com.au/ directly, without the crossfit-2 part).

    WPBook gets this “redirect_uri” by using what is set in WordPress settings as home_url().

    http://codex.wordpress.org/Function_Reference/home_url

    Is the idea that your wordpress installation is at the root of your site, but you use a static homepage and put the blog inside /crossfit-2/ ?

    If so, this is the root of the problem. Point Facebook at http://www.elitecon.com.au/ not at /crossfit-2/

    Thread Starter crossfitec

    (@crossfitec)

    Got it WOrking now. THanks for your help

    Is it possible to post as the Page rather than as my personal account?

    Plugin Author John Eckman

    (@johneckman)

    @crossfitec You should be publishing as the Page.

    WPBook Lite uses the page_access token when publishing to the page, which per Facebook documentation should impersonate the page:

    To impersonate the Page when posting to the wall (i.e. post as the Page, and not the current user), you must use a Page access_token with the manage_pages and publish_stream permissions, as described under Page Access Tokens above.

    What is showing on your WPBook Lite settings page with respect to access tokens?

    Is your personal profile ID an admin of the page to which you are posting, and does WPBook Lite have manage_pages permission?

    Thread Starter crossfitec

    (@crossfitec)

    Hi,

    When I request a token it is appending the below:

    https://www.facebook.com/dialog/oauth?client_id=xxxxxxxxxxxxxxx&redirect_uri=http://www.elitecon.com.au/%3Fwpbook=oauth&scope=read_stream,publish_stream,manage_pages,user_groups

    So it would seem it is requesting the right authorisation

    I don’t seem to have any settings in respect to access tokens on my WPBook Lite settings page.

    Yes my personal profile ID is an admin of the page.
    How do I check if WPBook Lite has manage_Pages permission?

    Excuse for my ignorance.

    Plugin Author John Eckman

    (@johneckman)

    @crossfitec – that looks like the right token request url, and it includes manage_pages.

    When you visit your WPBook Lite settings page, there should not be any setting related to tokens but it should tell you what tokens have been stored.

    Right below the generate access token link, the page should say something like this:

    That will trigger a multiple step process which will generate an access token and store it – you should see your blog home page load with a message at the top declaring success or offering an error. Revisit this page and you should see the access code stored below:

    Stored access token = AAADzrTzlu0kBasdaz3m1XAN5dkZA3bMiqUBZCytMsQdAsMrc9o2QTZCn4tFEUOmgTTDNxZC1Jq5JsmotZCXSXyaPOANCVAZD

    Note: If you already have a stored access_token, you should not need to generate a new one, but you can if need be – it won’t hurt anything. This stored access_token is required EVEN IF YOU DO NOT PLAN TO POST TO YOUR PERSONAL PROFILE WALL

    Permissions for pages

    You’ve indicated you wish to publish to this page: 44012349871

    An access token corresponding to the page titled WPBook has been stored.

    It is AAADzrTzlu0kBAK22h2LRZBasdasdasfdassdfNmyPqXWwzePVWNtCZBglbaUrF72cTPR3m0g52FJVNk5J0P3hmPfZAFhNbbsVmcG0MTC2HggZDZD

    Note that there are two access tokens listed there – you should be able to get yours off that page and check it using the Facebook Access Token debugger: https://developers.facebook.com/tools/debug/access_token

    Thread Starter crossfitec

    (@crossfitec)

    I only have a single stored access token displayed on the WPBook Lite settings page and that is the one below:

    “Revisit this page and you should see the access code stored below:
    Stored access token = AAADcZBqMSLi4BAKwsByW5LTsn0EvKdtXZAQZA9RZCBxxVtyLXz6rLxpE4S7yZAA6kM9hzdgr7hIkM5qoDeX5I2HWs8wuADi2HZBuBl6RjBXgZDZD”

    I’m not seeing the below part:

    “Permissions for pages

    You’ve indicated you wish to publish to this page: 44012349871

    An access token corresponding to the page titled WPBook has been stored.

    It is AAADzrTzlu0kBAK22h2LRZBasdasdasfdassdfNmyPqXWwzePVWNtCZBglbaUrF72cTPR3m0g52FJVNk5J0P3hmPfZAFhNbbsVmcG0MTC2HggZDZD”

    Is there a specific setting which enables the second token?

    Plugin Author John Eckman

    (@johneckman)

    Do you have a page indicated as a publishing target?

    Under Stream/Wall options, there’s a checkbox for publish to this page:

    followed by, when checked, a place to put a PageID.

    If that pageID is correct, and the profile ID entered as “your profile ID” is an admin of that page, and manage_pages permission is enabled, you should get the second part.

    When you load the WPBook Lite settings page, it uses your stored access token (the first one) to try to load a list of the pages you manage, checks for the one you have identified as a target, and if it finds that one stores the access token for it.

    If you’re not getting that part, either your Profile ID is wrong, or the PageID is wrong, or manage_pages hasn’t been granted, or ?

    Thread Starter crossfitec

    (@crossfitec)

    Works perfect now.

    Silly me, didn’t realise I had to click the “Publish to this page”

    Thanks so much for your help!

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