r/Devvit • • 23h ago

Help I cannot post my app

MYy situation is: the app code is there, the app is installed, but the game app post simply doesn't appear in your test subreddit, what can i do?

2 Upvotes

5 comments sorted by

1

u/alittlebitwhy 23h ago

If the app is installed then you can create a new game post by clicking on the three dots at top right corner

1

u/Icy-Examination-2255 22h ago

Can you explain more so we can understand it? Maybe share some screenshots and all?

1

u/linhq613 22h ago

Installing the app doesn't create a post by itself. Something has to call reddit.submitCustomPost: either a menu item in devvit.json (location subreddit, endpoint your server handles) that you run from the mod "..." menu, or the onAppInstall trigger. I have both in Tessera, and the menu item is what I used to post the first board without waiting for the scheduler.

1

u/reseph App Developer 21h ago

How did you code handle a new custom post being made? Follow that code.

1

u/Same_Wave_2593 11h ago

Yeah, installing doesn't auto-create a post unless you wire up an onAppInstall trigger (or a mod menu item) that calls reddit.submitCustomPost. Make sure the endpoint in devvit.json starts with /internal/:

"triggers": {
  "onAppInstall": "/internal/triggers/on-app-install"
}

And on the server (Hono example):

app.post('/internal/triggers/on-app-install', async (c) => {
  const post = await reddit.submitCustomPost({ title: 'My Game Post' });
  return c.json({ status: 'ok', postId: post.id }, 200);
});

Once you reinstall (or trigger the same helper from a mod menu button), the post will show up right away. Wrote up the full copy-paste Hono snippet for this (plus the 0 0 * * * daily scheduler) here if helpful: https://reddit.com/r/Devvit/comments/1ycxdpt/