WordPress.org

Ready to get started?Download WordPress

Forums

WPBook
Unable to Invite Friends to app (11 posts)

  1. aliferis
    Member
    Posted 3 years ago #

    Hi

    I have spent ages setting up my app and its worked great - except now I get this error when trying invite friends
    ------------------------------------------------------
    App temporarily unavailable
    Parse errors:

    FBML Error (line 14): illegal tag "body" under "fb:canvas"
    ------------------------------------------------------

    I have not added any html tags to the theme etc

    Bit lost how to sort this

  2. Brooke Dukes
    Member
    Plugin Contributor

    Posted 3 years ago #

    Sounds like it's having trouble switching to FBML for the invite section. What's you're app url? Is your invite friend url somthing like "http://apps.facebook.com/APPNAME/index.php?is_invite=true&fb_force_mode=fbml"?

  3. aliferis
    Member
    Posted 3 years ago #

  4. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    The app requires a login?

    Not sure how WPBook will work with any blog that requires a login.

    I suspect that for some reason the invite link is failing because that link can't be reached by Facebook.

    Or it may be the extra "/" between gpnetworks and index.php in your invite link, which is usually caused by an extra trailing slash on your application name in your wpbook settings.

  5. aliferis
    Member
    Posted 3 years ago #

    I think its the login issue - I removed the extra slash and no joy.

    Will have to live without the invite friends link in the app

    shame cause its loses some its viral nature without this

    thanks v much

    Joe

  6. aliferis
    Member
    Posted 3 years ago #

    So, the call to the invite throws an error and this produces the extra body tag error ?

    But I am already logged in to the app to make this invite ?

    There might be a workaround for this

    my canvas URL is this:

    http://www.gpnetworks.co.uk/app/index.php?signed_request=1

    Can I use this appended variable in the invite call ?

    joe

  7. Brooke Dukes
    Member
    Plugin Contributor

    Posted 3 years ago #

    My guess it's not actually adding a body tag. the fb_force_mode=fbml is telling Facebook to load your app in Facebook Markup Language (FBML) which is getting angry when seeing the body tag from the login from.

    But I am already logged in to the app to make this invite ?

    Are you saying that if the user is logged in to your site the invite link works? If so you might hack the invite link (see theme/index.php) to redirect to the login if the user isn't logged in else show the invite link. (or just hide the invite link unless they are logged in)

  8. aliferis
    Member
    Posted 3 years ago #

    no, i'm saying a user doe snot see the invite link unless they are logged in to the app

    so why would the invite link redirect to a login form ?
    joe

  9. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    I don't have any way to test this without creating an account in your app, which I've really no interest in doing. Do you have a test login of some kind?

    The "invite friends" link should get translated into this call to your server:

    http://www.gpnetworks.co.uk/app/index.php?signed_request=1&is_invite=true&fb_force_mode=fbml

    The "signed_request" bit triggers the WPBook plugin (lets us know we're inside FB), the is_invite bit tells WPBook to load the invite form, and the fb_force_mode bit tells FB this is an FBML page inside an app that is otherwise iFrame based.

    I think the problem is that to draw and FBML page, Facebook itself is interacting with your blog - not the logged in user's browser, but Facebook's HTTP agent, which has no account on your site.

    In short, I don't think the current invite page will work for blogs requiring a login.

    That said, Facebook is deprecating the FBML method and now encourages use of the Requests Dialog - http://developers.facebook.com/docs/reference/dialogs/requests/ - so we may soon revisit the whole flow and that might work better for your use case.

  10. johneckman
    Member
    Plugin Author

    Posted 3 years ago #

    Looks like we might be able to use

    http://www.facebook.com/multi_friend_selector.php?

    which we can pass in a bunch of variables (api_key, content, type, action, actiontext, and sig) and let FB draw the invite page itself.

    But this will take some time and testing - so not coming anytime too soon.

  11. aliferis
    Member
    Posted 3 years ago #

    I can wait for a total solution. What I have right now is a huge bit of progress from where I was.

    Will donate too

    Rgds

    joe

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags