Phase 6 part 4: post as the LinkedIn company page
A second LinkedIn app (Community Management API) with its own sign-in on Settings → Social accounts: the pages the member may post for are listed and one chosen, new LinkedIn drafts default to the page or to you, and each draft can switch before it's published. Schema 25. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+52
-50
@@ -119,6 +119,7 @@ func (s *Server) Handler() (http.Handler, error) {
|
||||
|
||||
mux.HandleFunc("GET /settings/accounts", s.accountsPage)
|
||||
mux.HandleFunc("POST /settings/accounts", s.accountsSave)
|
||||
mux.HandleFunc("POST /settings/accounts/linkedin-page", s.linkedInPageSave)
|
||||
mux.HandleFunc("POST /auth/{provider}/start", s.oauthStart)
|
||||
mux.HandleFunc("GET /auth/{provider}/callback", s.oauthCallback)
|
||||
|
||||
@@ -503,56 +504,57 @@ func (s *Server) fragment(w http.ResponseWriter, page, name string, data any) {
|
||||
|
||||
// Messages shown after a redirect, by code, so no user text is reflected.
|
||||
var flashes = map[string]string{
|
||||
"saved": "Saved.",
|
||||
"deleted": "Deleted.",
|
||||
"x-connected": "X is connected.",
|
||||
"li-connected": "LinkedIn is connected.",
|
||||
"google-connected": "Search Console is connected. Choose each website's property below, then sync.",
|
||||
"synced": "Synced from Search Console.",
|
||||
"report-written": "This week's report is written.",
|
||||
"setup-opened": "Pull request opened: read it on Gitea, then merge it.",
|
||||
"pinged": "Sent to IndexNow.",
|
||||
"brief-written": "Brief written. Read it, answer its questions, then write the page.",
|
||||
"page-written": "Page drafted. Read it, and confirm or remove every sentence that claims an experience.",
|
||||
"keywords-found": "Looked for keywords: the candidates are below.",
|
||||
"top-read": "Read the live top results.",
|
||||
"proposed": "Proposed: read each one, edit it if you like, then say yes or no.",
|
||||
"approved": "Approved: Supermarket is making the pull request; it shows here in a minute.",
|
||||
"declined": "Declined.",
|
||||
"auditing": "Auditing. It reads up to 300 pages politely, so it takes a few minutes; this page updates when it's done.",
|
||||
"no-data": "There isn't two weeks of Search Console data yet.",
|
||||
"reddit-connected": "Reddit is connected.",
|
||||
"crm-test": "Test Lead queued. Hermes creates it on its next run; or run it now (below).",
|
||||
"crm-sync": "Sync requested: Hermes copies CRM records on its next run.",
|
||||
"accepted": "Accepted: queued for the CRM. Hermes adds it on its next run.",
|
||||
"rejected": "Set aside.",
|
||||
"reconsidered": "Back in New.",
|
||||
"suppressed": "Added to the suppression list.",
|
||||
"unsuppressed": "Taken off the suppression list.",
|
||||
"prospect-added": "Added. Review it below.",
|
||||
"outcome": "Outcome recorded.",
|
||||
"discovering": "Searching. It takes a few minutes; new companies appear in Review, tagged with this signal.",
|
||||
"rules-refreshed": "Rules refreshed.",
|
||||
"imported": "Imported.",
|
||||
"hunter-done": "Hunter.io search done: the result is on the card.",
|
||||
"verified": "Checked with Hunter.io: the result is on each person.",
|
||||
"drafted-outreach": "Drafted. Read it, edit it, then queue it to send.",
|
||||
"queued": "Queued: it goes out in turn, within your sending hours.",
|
||||
"unqueued": "Back in Drafts.",
|
||||
"sent": "Sent.",
|
||||
"marked-sent": "Marked as sent.",
|
||||
"reply-recorded": "Reply recorded.",
|
||||
"checked": "Inbox checked: what it found is above.",
|
||||
"test-sent": "Test email sent: check your inbox.",
|
||||
"oauth-expired": "That sign-in took too long or was already used. Try again.",
|
||||
"dismissed": "Dismissed.",
|
||||
"restored": "Restored.",
|
||||
"drafted": "Drafts written. Review them below.",
|
||||
"published": "Published.",
|
||||
"discarded": "Discarded.",
|
||||
"scheduled": "Scheduled.",
|
||||
"posted": "Marked as posted: it's under Content → Published.",
|
||||
"unscheduled": "Back in Posts: edit it, then publish or schedule it again.",
|
||||
"saved": "Saved.",
|
||||
"deleted": "Deleted.",
|
||||
"x-connected": "X is connected.",
|
||||
"li-connected": "LinkedIn is connected.",
|
||||
"li-page-connected": "The LinkedIn page app is connected.",
|
||||
"google-connected": "Search Console is connected. Choose each website's property below, then sync.",
|
||||
"synced": "Synced from Search Console.",
|
||||
"report-written": "This week's report is written.",
|
||||
"setup-opened": "Pull request opened: read it on Gitea, then merge it.",
|
||||
"pinged": "Sent to IndexNow.",
|
||||
"brief-written": "Brief written. Read it, answer its questions, then write the page.",
|
||||
"page-written": "Page drafted. Read it, and confirm or remove every sentence that claims an experience.",
|
||||
"keywords-found": "Looked for keywords: the candidates are below.",
|
||||
"top-read": "Read the live top results.",
|
||||
"proposed": "Proposed: read each one, edit it if you like, then say yes or no.",
|
||||
"approved": "Approved: Supermarket is making the pull request; it shows here in a minute.",
|
||||
"declined": "Declined.",
|
||||
"auditing": "Auditing. It reads up to 300 pages politely, so it takes a few minutes; this page updates when it's done.",
|
||||
"no-data": "There isn't two weeks of Search Console data yet.",
|
||||
"reddit-connected": "Reddit is connected.",
|
||||
"crm-test": "Test Lead queued. Hermes creates it on its next run; or run it now (below).",
|
||||
"crm-sync": "Sync requested: Hermes copies CRM records on its next run.",
|
||||
"accepted": "Accepted: queued for the CRM. Hermes adds it on its next run.",
|
||||
"rejected": "Set aside.",
|
||||
"reconsidered": "Back in New.",
|
||||
"suppressed": "Added to the suppression list.",
|
||||
"unsuppressed": "Taken off the suppression list.",
|
||||
"prospect-added": "Added. Review it below.",
|
||||
"outcome": "Outcome recorded.",
|
||||
"discovering": "Searching. It takes a few minutes; new companies appear in Review, tagged with this signal.",
|
||||
"rules-refreshed": "Rules refreshed.",
|
||||
"imported": "Imported.",
|
||||
"hunter-done": "Hunter.io search done: the result is on the card.",
|
||||
"verified": "Checked with Hunter.io: the result is on each person.",
|
||||
"drafted-outreach": "Drafted. Read it, edit it, then queue it to send.",
|
||||
"queued": "Queued: it goes out in turn, within your sending hours.",
|
||||
"unqueued": "Back in Drafts.",
|
||||
"sent": "Sent.",
|
||||
"marked-sent": "Marked as sent.",
|
||||
"reply-recorded": "Reply recorded.",
|
||||
"checked": "Inbox checked: what it found is above.",
|
||||
"test-sent": "Test email sent: check your inbox.",
|
||||
"oauth-expired": "That sign-in took too long or was already used. Try again.",
|
||||
"dismissed": "Dismissed.",
|
||||
"restored": "Restored.",
|
||||
"drafted": "Drafts written. Review them below.",
|
||||
"published": "Published.",
|
||||
"discarded": "Discarded.",
|
||||
"scheduled": "Scheduled.",
|
||||
"posted": "Marked as posted: it's under Content → Published.",
|
||||
"unscheduled": "Back in Posts: edit it, then publish or schedule it again.",
|
||||
}
|
||||
|
||||
func redirect(w http.ResponseWriter, r *http.Request, path, msg string) {
|
||||
|
||||
Reference in New Issue
Block a user