0
votes

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"?

1

1 Answers

1
votes

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.