Skip to content

Conversation

@micahflee
Copy link
Member

@micahflee micahflee commented Dec 1, 2025

Implements #582, #617, #618.

This adds basic support for the Facebook platform. Some of the bigger things to note:

  • Deleting everything from your Facebook wall is a premium feature. The full premium flow should be tested, with the dev server.
  • Facebook support is hidden behind a flag, for now
  • This relies on English-language strings, and so therefore when you delete wall posts, it first updates your language to English (if it isn't already), deletes posts, then changes it back
  • This implements BaseViewModel.clickElementByXPath which makes development much faster, because in chrome/firefox dev tools, when inspecing an element, you can copy it's XPath
  • This implements BaseViewModel.safeExecuteJavaScript which I think is a better way to execute js in the webview going forward, since it wraps it in all the error catching we need
  • This submits Facebook progress records to the Cyd server via the API, and relies on a new API endpoint, see https://github.com/lockdown-systems/cyd-server/pull/150

Feature flag

You need to enable the Facebook feature flag:

export CYD_FEATURE_FACEBOOK=1
npm run start

Archive instructions

In the Facebook dashboard, clicking "Get Archive from Meta" links to https://docs.cyd.social/docs/facebook/get-archive, which is a broken link. To. view the instructions:

cd docs
npm run start

Then load http://localhost:3000/docs/next/facebook/get-archive.

Testing

Here are some of the things to test for, though you might think of others:

  • UX design and the language used should all look good
  • Thoroughly test the premium gating. This entails running Cyd in local (npm run config-local), and running a separate instance of cyd-server from this PR branch.
    • Facebook platform should be gated behind a premium account
    • The sign in/upgrade flow should all work fine -- if not signed in, it should prompt you to. If signed in but not paying for premium, it should give you instructions, etc.
    • If using open mode (npm run config-open) it should allow you to bypass premium gating
  • Thoroughly test the deleting wall posts functionality
    • It deletes 50 at a time. So it should work fine to delete many more than this, e.g. 110 should take 3 rounds of deletions
    • It should work when there's stuff that cannot be deleted in the list of items (like avatar updates)
    • It should count the number of posts deleted successfully, and it should submit the correct number to the server
  • Ensure that the database migrations work as expected (I actually think this might be an issue, but haven't tested a lot myself -- start a Cyd database using the latest release tag, then switch to this branch and make sure there are no errors)

Future work before we're ready

This is a huge PR so I'm going to stop for now, but there are a few things that I think we also need to handle, which I haven't really tackled here:

  • nevermind I did this: Handle rate limits. I don't have enough data in my test Facebook account to hit a rate limit, so I actually have no idea how Facebook handles them. Here's the issue: Facebook: handle rate limits #617
  • nevermind I did this: Handle error reports. If something breaks (like it's trying to click a button that doesn't exist) it silently fails, but really it should submit an error report. Here's the issue: Facebook: handle error reports #618
  • Do we want more features in this first release? For example, I noticed that in the Manage Posts feature you can bulk hide things that aren't posts (updating your avatar or cover image, for example). We could have an option to automatically hide those. Also, you can bulk untag yourself from posts, though I'm not sure how this works and would require more testing. We should decide if we want to add these (because they might be easy wins?) or release with just deleting posts.

…acebookViewModel settings before starting jobs
…and always report progress (even if 0 posts are deleted)
@micahflee micahflee marked this pull request as ready for review December 24, 2025 01:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants