Take the 2-minute tour ×

I am making an android app that publishes facebook posts. I want it to publish posts anytime the user presses the "Send" button.

According the the Facebook developer permissions page, the offline_access permission "Enables your app to perform authorized requests on behalf of the user at any time. By default, most access tokens expire after a short time period to ensure applications only make requests on behalf of the user when the are actively using the application. This permission makes the access token returned by our OAuth endpoint long-lived."

The Facebook developper page describes the "publish_stream" permission as Enables your app to post content, comments, and likes to a user's stream and to the streams of the user's friends. With this permission, you can publish content to a user's feed at any time, without requiring offline_access. However, please note that Facebook recommends a user-initiated sharing model."

So, as I understand it, to send posts to the Facebook wall I should only need the "publish stream permission" However when I ask for just the publish_stream" permission my access token is only short-lived (two hours long)

Can anyone explain how I can post to the Facebook at anytiome without using the "offline_access permission"?

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Publish Stream allows you to publish to the users wall. This is needed to make wall posts.

In order for your access token to last more than a short duration you need to also request offline access. This doesn't allow you to post to the user's wall it just determines how long you token lasts.

In your case, you probably want both offline access and publish stream.

share|improve this answer
Thanks for your answer. I a still a bit confused as the documentation says "you can publish content to a user's feed at any time, without requiring offline_access". Also, apps like TweetDeck do not ask for offline access. The reason I am reluctant to use the "offline_access" permission is firstly because it looks scary to users, secondly I only want access when using the app, and lastly when I do use the offline_access permission I get errors like (341) feed action request limit reached. Any other suggestions appreciated... –  Mel Oct 31 '11 at 4:08
I have to admit this answer seems correct. Without the "offline_access" permission my token's expiry date is less that 2 hours long. (I also now realise I was wrong in saying that TweetDeck does not ask for offline_access permission, it does). Nonetheless, I think the Facebook documentation is misleading as it does say that with the publish_stream permission you can "publish content to a user's feed at any time, without requiring offline_access". :-( –  Mel Nov 1 '11 at 22:33
@Mel welcome to Facebook development. The documentation is often wrong, out of date, or misleading. Sadly. –  Frazell Thomas Nov 1 '11 at 23:18
add comment

Your Answer


