Forums

Simple Facebook Connect
Need to constantly re-Grant SFC Persmission (7 posts)

  1. murfguy
    Member
    Posted 3 months ago #

    Posting to my Fan Page (whether automatic, or self-pushed via the button the edit post page) does not work at first. I get an error in the Facebook frame that says "An error occured, please try again later."

    I can at least submit via the Edit Post Page if I go to the settings and click the "Grant SFC Permissions" button. But I need to do this everytime I'm back in a new session.

    In my settings, the token checks are all "ready to go!" I've verified my App ID, App Secret and Fan Page ID. I've even tried making a new App, just in case. The checkbox for "Automatically Publish to Facebook Fan Page" is checked.

    I've tried using the Chrome Javascipt console panel, but when the "Error occured" notice comes up, I get nothing in the console.

    As best as I can tell, SFC appears to be working correctly. It will auto-post as long as I'm in a current session. The best way I can describe it is that it would appear that my tokens go "stale" after a short time of inactivity.

    Is there anything I can do to fix this issue? Is it an issue with Facebook?

    Any help in this matter is greatly appreciated.

    http://wordpress.org/extend/plugins/simple-facebook-connect/

  2. Otto
    Tech Ninja
    Posted 3 months ago #

    The manual post buttons on the edit screen actually work in an entirely different way than the automatic posting and "grant permission" buttons.

    Question: Do you normally "log out" of Facebook?

    If so, that might explain a few things.

  3. murfguy
    Member
    Posted 3 months ago #

    I do not routinely log out of Facebook since I primarily use it on private machines.

  4. dmullens
    Member
    Posted 3 months ago #

    I'm getting the same error. I added the plugin yesterday and did my first post. This morning when I tried it I received an error. After reading these posts I went back into the settings and clicked on the "Grant Permissions" button and I was able to manually post (I had it setup to automatically do it).

    Right now I'm in the same boat as @murfguy

  5. dmullens
    Member
    Posted 3 months ago #

    Per @Otto's question, I might not have been logged into Facebook. Usually I am. However, later, when I went to Facebook it asked me to log in. Not sure when I got logged out. Just thought I'd post this as an FYI. I'll try to pay more attention next time I do a post.

  6. Otto
    Tech Ninja
    Posted 3 months ago #

    Okay, a few points here:

    - The manual publishing buttons on the Edit Post page are completely and totally separate from the automatic publishing system. The two do not function in the same way at all, and they have absolutely nothing in common whatsoever. So don't confuse the two, as that seems to be the source of some confusion.

    - You do not have to "grant permissions" to the automatic publisher to use the manual publishing buttons. Granting permissions won't change the manual publishing buttons operation.

    - Logging out of Facebook will invalidate your current access token in the cookie stored in the browser. This will very likely make those manual publishing buttons stop working until you take some action that causes the cookie to "refresh". Clicking that grant permissions button will do that. So will clicking any FB Login button on the site.

    The general solution to this problem is: stop logging out of Facebook. At least, stop doing it in that browser. Those buttons have no way to tell whether the cookie'd access token is valid or not, so they'll appear (but not work properly) even if you've invalidated your token.

    I'll try to figure out a way to auto-refresh the token or at least check if it's invalid, but if you log out of Facebook on a regular basis, then yes, you're going to have this problem eventually. Don't log out and it won't appear.

  7. Otto
    Tech Ninja
    Posted 3 months ago #

    Okay, I've removed the access token handling code from the manual publishing buttons entirely. In my testing, this appears to work when you log out and back in, because instead of using the access token provided by the plugin, it will use the current credentials you have on Facebook. You'll still need to be logged in, obviously, but you won't have the same error when you log out and back in and thus invalidate the token.

    Note that logging out and back in may still break the auto-publishing to your Profile, for much the same reasons. Still working on that one.

    Try the development version of the plugin and let me know if it helps any:
    http://wordpress.org/extend/plugins/simple-facebook-connect/download/

Reply

You must log in to post.

About this Plugin

About this Topic