Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook chnages #179

Closed
wants to merge 13 commits into from
Closed

Facebook chnages #179

wants to merge 13 commits into from

Conversation

aratidgr8
Copy link
Contributor

No description provided.

Copy link
Member

@wpscholar wpscholar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm just giving this a quick PR per Jocelyn's request. It looks like it is probably still in flux and the latest changes from the main branch still need to be merged.

package.json Outdated
@@ -24,6 +24,7 @@
"@newfold-labs/js-utility-ui-analytics": "^1.2.0",
"@newfold-labs/wp-module-runtime": "^1.0.0",
"@newfold/ui-component-library": "^1.0.0",
"@newfold/wp-module-facebook": "file:../wp-module-facebook",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this will need to be updated before release

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, we'll update it before the release.

if ( ! $hiive_token ) {}
return new \WP_REST_Response(
array(
'token' => $hiive_token ? $hiive_token : 'test2',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should probably just return an empty string instead of test2?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're storing it as Key value pair in cloudflare and as key can't be blank. In local, as we don't have a hiiive_token .So, we've added a placeholder variable as test2

array(
array(
'methods' => \WP_REST_Server::READABLE,
'callback' => array( $this, 'get_hiive_token' ),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where are we using this API? I'm uneasy about passing a Hiive token to the front end.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this endpoint we're using it in facebook module to store facebook token against hiive token as key-value pair in cloudflare

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants