Marcus finishes facebook autoposter backend#2005
Marcus finishes facebook autoposter backend#2005marcusyi1 wants to merge 19 commits intodevelopmentfrom
Conversation
This reverts commit 8007a29.
|
Hi @marcusyi1 |
| } catch (error) { | ||
| const fbError = error.response?.data?.error; | ||
|
|
||
| const connection = await FacebookConnection.getActiveConnection(); |
There was a problem hiding this comment.
This is called again, but it was already fetched at the top of the function. If the first call succeeded but the axios call failed, the connection is already in scope and no need to fetch it again. Also if this second call itself throws, the error will be swallowed entirely.
|
|
||
| const connection = await FacebookConnection.getActiveConnection(); | ||
| if (connection) { | ||
| connection.lastError = fbError?.message || error.message; |
There was a problem hiding this comment.
Is the reason this is a POST rather than GET because it updates lastVerifiedAt and lastError after verifying? Just want to understand the intent here
| router.route('/social/facebook/auth/callback').post(handleAuthCallback); | ||
| router.route('/social/facebook/auth/connect').post(connectPage); | ||
| router.route('/social/facebook/auth/disconnect').post(disconnectPage); | ||
| router.route('/social/facebook/auth/verify').post(verifyConnection); |
There was a problem hiding this comment.
changes needed if agreed to change it as GET
|
Tested /api/social/facebook/auth/status which responded with {"connected":false,"message":"No Facebook Page connected"}, so the frontend crash is happening before the Facebook backend flow is reached, so unable to complete the actual Facebook OAuth/posting step after that. Also posted comments and screenshots on the frontend for PR #4714 OneCommunityGlobal/HighestGoodNetworkApp#4714 (comment) |
|




Main frontend PR: OneCommunityGlobal/HighestGoodNetworkApp#4714
…
Main changes explained:
New Files:
Updated Files:
Environment Variables Added: