2

Is it possible to make a Facebook app which edits user's post on his wall automatically (edits EVERY POST that user makes, app has user's permission and everything) I don't think that's possible, but maybe I'm wrong?

3 Answers3

4

Based on the Graph API docs, I actually think it could work.

  1. Get the extended permission called "offline_access". See http://developers.facebook.com/docs/authentication/permissions
  2. Periodically pull from https://graph.facebook.com/PROFILE_ID/feed to see if the user has posted new posts.
  3. If so, for each new post that has appeared:
  4. Pull and store the text of the post.
  5. Manipulate the text as desired.
  6. Delete the original post using "DELETE". See http://developers.facebook.com/docs/api#deleting
  7. Publish your modified version of the post using "POST". See http://developers.facebook.com/docs/api#publishing
AlcubierreDrive
  • 3,654
  • 2
  • 29
  • 45
  • I see, but that wasn't really what I was expecting. Thanks! –  Sep 17 '10 at 07:26
  • One more question, is it possible to make a fb app to run automatically? With 10min intervals etc. –  Sep 18 '10 at 17:50
  • Since your app is just code running on your server, you can program it to do stuff whenever you want. As long as you have the `offline_access` permission, you are not restricted to acting whenever you get a callback from facebook. Instead, e.g., you can write code that includes a timer that every 10 min calls any other part of your code. E.g. in Python use a `ttimer` with a callback. Or in PHP, use an infinite loop with a `sleep` command in it. (Just make sure you separate that infinite loop from the program that facebook calls or you will never return the data a user requests. :P ) – AlcubierreDrive Sep 21 '10 at 03:59
  • @EvolvedAI, do you think the method you describe in the answer could be used to [edit all past posts a user has made](http://stackoverflow.com/questions/16555091/does-the-facebook-api-allow-for-automated-changes-to-old-post-visibility), or are there likely to be bugs? – Baumr May 16 '13 at 13:48
1

@Jon: You cannot delete a post that your application has not published. See here: https://developers.facebook.com/docs/reference/api/post/

Breiz
  • 1,153
  • 2
  • 13
  • 27
0

No, it's not possible for security reasons. Even though you probably have the best of intentions, there are lots of people who unfortunately don't. The few ruin it for all.

Ryan Hayes
  • 5,290
  • 4
  • 42
  • 52
  • It must be the same [for changing older posts as well](http://stackoverflow.com/questions/16555091/does-the-facebook-api-allow-for-automated-changes-to-old-post-visibility), correct? – Baumr May 16 '13 at 13:49