Phillip B Oldham
Phillip B Oldham

Reputation: 19385

Post to a Facebook user's stream at a later date?

What would be the common workflow to be able to post to a user's feed/stream a couple of hours/days after they've accepted your access permissions on your "canvas" app?

For instance, if someone were to register their interest to be notified when something has been released, how could we post on their wall the release notification when it occurs a few days later?

Specifically, how would authentication work? Does one need to log the keys gathered during the original authentication process?

Upvotes: 2

Views: 427

Answers (2)

shanethehat
shanethehat

Reputation: 15570

When you request permissions during authentication you must request the offline_access permission to post to the users wall when they're not signed in. With this permission, the access token you use to perform api requests becomes permanent, and you can use it at any time.

Further reading: Facebook offline access step-by-step

Upvotes: 2

Brian Kelly
Brian Kelly

Reputation: 19305

If the user has given your app permissions to write to their wall, you can write to it pretty much whenever you like. Once your big event occurs, just have your app walk the list of registered users and post to their walls.

It sounds like your update might be more appropriate for a direct user message, though. Posting to their wall every time you release an update to it might make your app appear noisy and annoying and cause it to be considered a "spamville".

Upvotes: 1

Related Questions