I fixed it!
So this requires a few steps. Simple and AppGameKit should implement them. I'll let Paul know because it doesn't require an SDK update just some extra code.
So in a nutshell what is happening is that there is NO facebook session passed to the RunnableFacebook class in AGKHelper. I've not dug in to iOS, but it doesn't seem to be an issue there.
To fix you'll first need to pass the facebook session object to the RunnableFacebook class like so:
In AGKHelper.java in the AGKHelper class there is the FacebookPost() method. After the line that reads
feed.act = act;
add
feed.session = Session.getActiveSession();
(Eclipse will complain a bit, but we'll fix that momentarily)
Next go to the RunnableFacebook class in AGKHelper.java (up near the top). In the variable decalrations type in
public Session session;
In the run() method add this code before feed.dialog
feed.authorize(act , new String[] {"publish_actions"} , new DialogListener() {
public void onFacebookError(FacebookError arg0) { }
public void onError(DialogError arg0) { }
public void onComplete(Bundle arg0) { }
public void onCancel() { }
});
feed.setSession(session);
What that does is it explicitly asks for publishing permission (required by Facebook otherwise what you publish with your app runs the risk of being published privately to the user...). The user will see a permission authorization dialogue saying the app wants to post on their behalf. Then it sets the session for feed to be the active session for Facebook. So to ensure this works you'll likely need to call FacebookLogin() right before you go to post. That way you are ensured that there is an active Facebook session. Unfortunately Facebook does not allow for you to ask for publish permissions at the same time you ask for log in permissions so there will always be that second authorization request for first-time users.
I've tested about a dozen times and it works quite well